1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- import java.util.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
- import org.junit.Assert;
-
-
- /**
- * The test class FizzBuzzTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class FizzBuzzTest
- {
- @Test
- public void testFizz1(){
- Integer input = 3;
-
- FizzBuzz fizzBuzz = new FizzBuzz(input);
- String expected = "Fizz";
- String actual = fizzBuzz.fizz();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void testFizz2(){
- Integer input = 9;
-
- FizzBuzz fizzBuzz = new FizzBuzz(input);
- String expected = "Fizz";
- String actual = fizzBuzz.fizz();
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void testBuzz1(){
- Integer input = 5;
-
- FizzBuzz fizzBuzz = new FizzBuzz(input);
- String expected = "Buzz";
- String actual = fizzBuzz.buzz();
-
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void testBuzz2(){
- Integer input = 10;
-
- FizzBuzz fizzBuzz = new FizzBuzz(input);
- String expected = "Buzz";
- String actual = fizzBuzz.buzz();
-
-
- Assert.assertEquals(expected, actual);
- }
-
- @Test
- public void testFizzBuzz1(){
- Integer input = 15;
-
- FizzBuzz fizzBuzz = new FizzBuzz(input);
- String expected = "FizzBuzz";
- String actual = fizzBuzz.fizzBuzz();
-
-
- Assert.assertEquals(expected, actual);
-
- }
-
- @Test
- public void testFizzBuzz2(){
- Integer input = 30;
-
- FizzBuzz fizzBuzz = new FizzBuzz(input);
- String expected = "FizzBuzz";
- String actual = fizzBuzz.fizzBuzz();
-
-
- Assert.assertEquals(expected, actual);
-
- }
-
- }
|