| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class FizzBuzzTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class FizzBuzzTest
- {
- /**
- * Default constructor for test class FizzBuzzTest
- */
- @Test
- public void FizzBuzzTest()
- {
- int number = 15;
- String expected = "FizzBuzz";
- //where you cll the method
- String actual = FizzBuzz.FizzBuzzGame(number);
- assertEquals(expected, actual);
- }
- @Test
- public void FizzBuzzTest2()
- {
- int number = 6;
- String expected = "Fizz";
- //where you cll the method
- String actual = FizzBuzz.FizzBuzzGame(number);
- assertEquals(expected, actual);
- }
- @Test
- public void FizzBuzzTest3()
- {
- int number = 5;
- String expected = "Buzz";
- //where you cll the method
- String actual = FizzBuzz.FizzBuzzGame(number);
- assertEquals(expected, actual);
- }
- @Test
- public void FizzBuzzTest4()
- {
- int number = 0;
- String expected = "";
- //where you cll the method
- String actual = FizzBuzz.FizzBuzzGame(number);
- assertEquals(expected, actual);
- }
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- */
- @Before
- public void setUp()
- {
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- @After
- public void tearDown()
- {
- }
- }
|