Ad
  • Default User Avatar

    Language?

  • Custom User Avatar

    The test cases people contributed for Haskell […] are a bit strange

    The test cases in Haskell simply generate a list of random words.

  • Custom User Avatar

    I created simple test cases.

    import org.junit.Assert;
    import org.junit.Test;

    public class TestCaffeineBuzz {
    @Test
    public void testOutputJava() {
    Assert.assertEquals("Java", CaffeineBuzz.caffeineBuzz(3));
    }

    @Test
    public void testOutputJavaScript() {
    	Assert.assertEquals("JavaScript", CaffeineBuzz.caffeineBuzz(6));
    }
    
    @Test
    public void testOutputCoffeeScript() {
    	Assert.assertEquals("CoffeeScript", CaffeineBuzz.caffeineBuzz(12));
    }
    
    @Test
    public void testOutputMochaMissing() {
    	Assert.assertEquals("mocha_missing!", CaffeineBuzz.caffeineBuzz(1));
    }
    

    }

  • Default User Avatar

    The test cases people contributed for Haskell, and particularly Java are a bit strange. The original kata is string in, string out. I think following that model might help you with the Java test cases.