12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
-
-
- import 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
- {
- FizzBuzz fb;
- @Before
- public void setup() {
- fb = new FizzBuzz();
- }
- @Test
- public void fizzBuzzTest1() {
- String expected = "1";
-
- String actual = fb.of(1);
-
- Assert.assertEquals(expected, actual);
- }
- @Test
- public void fizzBuzzTest3() {
- String expected = "fizz";
-
- String actual = fb.of(3);
-
- Assert.assertEquals(expected, actual);
- }
- @Test
- public void fizzBuzzTest9() {
- String expected = "fizz";
-
- String actual = fb.of(9);
-
- Assert.assertEquals(expected, actual);
- }
- @Test
- public void fizzBuzzTest5() {
- String expected = "buzz";
-
- String actual = fb.of(5);
-
- Assert.assertEquals(expected, actual);
- }
- @Test
- public void fizzBuzzTest10() {
- String expected = "buzz";
-
- String actual = fb.of(10);
-
- Assert.assertEquals(expected, actual);
- }
- @Test
- public void fizzBuzzTest15() {
- String expected = "fizzbuzz";
-
- String actual = fb.of(15);
-
- Assert.assertEquals(expected, actual);
- }
- }
|