123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class FizzBuzzConverterTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class FizzBuzzConverterTest
- {
- FizzBuzzConverter fizzBu = new FizzBuzzConverter();
- @Test
- public void fizzBuzzConverterLeavesNormalNumbers(){
- int x =2;
- String actual =this.fizzBu.fizzBuzz(x);
- String expected = "2";
- assertEquals(expected,actual);
-
-
- }
-
- @Test
- public void fizzBuzzConvertorMultiplesOfThree(){
- int x = 3;
- String actual = this.fizzBu.fizzBuzz(x);
- String expected = "Fizz";
- assertEquals(expected,actual);
-
-
- }
-
- @Test
- public void fizzBuzzConvertorMultiplesOfFive(){
- int x=5;
- String actual = fizzBu.fizzBuzz(x);
- String expected = "Buzz";
- assertEquals(expected, actual);
-
-
- }
-
- @Test
- public void fizzBuzzConvertorMultiplesOfFifthTeen(){
- int x = 15;
- String actual = this.fizzBu.fizzBuzz(x);
- String expected = "Fizz Buzz";
- assertEquals(expected, actual);
-
-
- }
- }
|