123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
-
-
- 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 fb = new FizzBuzz();
- String actual = fb.of(3);
- String expected = "Fizz";
- assertEquals(expected, actual);
- }
- @Test
- public void buzz(){
- FizzBuzz fb = new FizzBuzz();
- String actual = fb.of(5);
- String expected = "Buzz";
- assertEquals(expected, actual);
- }
-
- @Test
- public void FizzBuzz(){
- FizzBuzz fb = new FizzBuzz();
- String actual = fb.of(15);
- String expected = "FizzBuzz";
- assertEquals(expected, actual);
- }
-
- @Test
- public void noFizzBuzz(){
- FizzBuzz fb = new FizzBuzz();
- String actual = fb.of(13);
- String expected = "13";
- assertEquals(expected, actual);
- }
-
- }
-
|