Created
October 14, 2014 02:57
-
-
Save lynnlangit/60fd7d7f09d6f8c6b07e to your computer and use it in GitHub Desktop.
TKP Java FizzBuzz Tests Solutions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.teachingkidsprogramming.sectionLYNNtdd; | |
import static org.junit.Assert.assertEquals; | |
import org.junit.Test; | |
public class FizzBuzzTest | |
{ | |
@Test | |
public void test1Returns1() | |
{ | |
String result = FizzBuzz.convert(1); | |
assertEquals("1", result); | |
} | |
@Test | |
public void test2Returns2() | |
{ | |
String result = FizzBuzz.convert(2); | |
assertEquals("2", result); | |
} | |
@Test | |
public void test3ReturnsFizz() | |
{ | |
String result = FizzBuzz.convert(3); | |
assertEquals("Fizz", result); | |
} | |
@Test | |
public void test5ReturnsBuzz() | |
{ | |
String result = FizzBuzz.convert(5); | |
assertEquals("Buzz", result); | |
} | |
@Test | |
public void test6ReturnsFizz() | |
{ | |
String result = FizzBuzz.convert(6); | |
assertEquals("Fizz", result); | |
} | |
@Test | |
public void test10ReturnsBuzz() | |
{ | |
String result = FizzBuzz.convert(10); | |
assertEquals("Buzz", result); | |
} | |
@Test | |
public void test15ReturnsFizzBuzz() | |
{ | |
String result = FizzBuzz.convert(15); | |
assertEquals("FizzBuzz", result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment