Skip to content

@kings13y /FizzBuzzJUnitTest.java
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
FizzBuzz Java JUnit test
package org.scalabound.scatdd;
import static org.junit.Assert.*;
import org.junit.Test;
import org.scalabound.scatdd.FizzBuzz;
public class FizzBuzzJUnitTest {
@Test
public void testMultipleOfThreeAndFivePrintsFizzBuzz() {
assertEquals("FizzBuzz", FizzBuzz.eval(15));
}
@Test
public void testMultipleOfThreeOnlyPrintsFizz() {
assertEquals("Fizz", FizzBuzz.eval(12));
}
@Test
public void testMultipleOfFiveOnlyPrintsBuzz() {
assertEquals("Buzz", FizzBuzz.eval(10));
}
@Test
public void testNonMulitpleOfThreeOrFivePrintsTheNumber() {
assertEquals("11", FizzBuzz.eval(11));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.