Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Embed URL


Subversion checkout URL

You can clone with
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 {
public void testMultipleOfThreeAndFivePrintsFizzBuzz() {
assertEquals("FizzBuzz", FizzBuzz.eval(15));
public void testMultipleOfThreeOnlyPrintsFizz() {
assertEquals("Fizz", FizzBuzz.eval(12));
public void testMultipleOfFiveOnlyPrintsBuzz() {
assertEquals("Buzz", FizzBuzz.eval(10));
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.