123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import static org.junit.Assert.*;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. /**
  6. * The test class FizzBuzzGameTest.
  7. *
  8. * @author (your name)
  9. * @version (a version number or a date)
  10. */
  11. public class FizzBuzzGameTest
  12. {
  13. /**
  14. * Default constructor for test class FizzBuzzGameTest
  15. */
  16. @Test
  17. public void testThree(){
  18. int input = 6;
  19. String expected = ("FIZZ!");
  20. String actual = FizzBuzzGame.game(input);
  21. assertEquals(expected, actual);
  22. }
  23. @Test
  24. public void testFive(){
  25. int input = 10;
  26. String expected = ("BUZZ!");
  27. String actual = FizzBuzzGame.game(input);
  28. assertEquals(expected, actual);
  29. }
  30. @Test
  31. public void testOther(){
  32. int input = 7;
  33. String expected = "7";
  34. String actual = FizzBuzzGame.game(input);
  35. assertEquals(expected, actual);
  36. }
  37. @Test
  38. public void testThreeFive(){
  39. int input = 30;
  40. String expected = ("FizzBuzz!!!");
  41. String actual = FizzBuzzGame.game(input);
  42. assertEquals(expected, actual);
  43. }
  44. }