ace

test by number test

ace
Oct 13th, 2010
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public void answerByNumber(String input){
  2. int number;
  3. try {
  4. number = Integer.parseInt(input);
  5. printAnswer(getAnswer(number));
  6. } catch (NumberFormatException e) {
  7. // TODO Auto-generated catch block
  8. System.out.println("enter a number.");
  9. }
  10.  
  11. }
  12.  
  13.  
  14. this is the test
  15.  
  16.  
  17. public void testAnswerByNumber(){
  18. Seer seer = new Seer();
  19. Magic8Ball magic8Ball = new Magic8Ball();
  20. String string1 = "this is the test string.";
  21. magic8Ball.changeArrayList(seer.getAL());
  22. magic8Ball.getArrayList().add(string1);
  23. String string = "number 0";
  24. magic8Ball.answerByNumber(string);
  25.  
  26.  
  27. }
Add Comment
Please, Sign In to add comment