1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
-
- 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
- {
-
- @Test
- public void Fizz()
- {
- FizzBuzz fizzbuzz = new FizzBuzz();
-
- assertEquals("Fizz", fizzbuzz.FizzBuzz(3));
- assertEquals("Fizz", fizzbuzz.FizzBuzz(6));
- assertEquals("Fizz", fizzbuzz.FizzBuzz(9));
- }
-
- @Test
- public void Buzz()
- {
- FizzBuzz fizzbuzz = new FizzBuzz();
-
- assertEquals("Buzz", fizzbuzz.FizzBuzz(5));
- assertEquals("Buzz", fizzbuzz.FizzBuzz(10));
- assertEquals("Buzz", fizzbuzz.FizzBuzz(25));
- }
-
-
- @Test
- public void FizzBuzz()
- {
- FizzBuzz fizzbuzz = new FizzBuzz();
-
- assertEquals("FizzBuzz", fizzbuzz.FizzBuzz(15));
- assertEquals("FizzBuzz", fizzbuzz.FizzBuzz(30));
- assertEquals("FizzBuzz", fizzbuzz.FizzBuzz(60));
- }
- }
|