Skip to content

Instantly share code, notes, and snippets.

@toutantic
Created November 16, 2011 13:59
Show Gist options
  • Save toutantic/1370118 to your computer and use it in GitHub Desktop.
Save toutantic/1370118 to your computer and use it in GitHub Desktop.
FooBarQixTest
package net.codestory.fooBarQix;
import static org.junit.Assert.*;
import org.junit.Test;
public class fooBarQixTest {
String expected[]= new String[]{
"1",
"2",
"FooFoo",
"4",
"BarBar",
"Foo",
"QixQix",
"8",
"Foo",
"Bar",
"11",
"Foo",
"Foo",
"Qix",
"FooBarBar",
"16",
"Qix",
"Foo",
"19",
"Bar",
"FooQix",
"22",
"Foo",
"Foo",
"BarBar",
"26",
"FooQix",
"Qix",
"29",
"FooBarFoo",
"Foo",
"Foo",
"FooFooFoo",
"Foo",
"BarQixFooBar",
"FooFoo",
"FooQix",
"Foo",
"FooFoo",
"Bar",
"41",
"FooQix",
"Foo",
"44",
"FooBarBar",
"46",
"Qix",
"Foo",
"Qix",
"BarBar",
"FooBar",
"Bar",
"BarFoo",
"FooBar",
"BarBarBar",
"QixBar",
"FooBarQix",
"Bar",
"Bar",
"FooBar",
"61",
"62",
"FooQixFoo",
"64",
"BarBar",
"Foo",
"Qix",
"68",
"Foo",
"BarQixQix",
"Qix",
"FooQix",
"QixFoo",
"Qix",
"FooBarQixBar",
"Qix",
"QixQixQix",
"FooQix",
"Qix",
"Bar",
"Foo",
"82",
"Foo",
"FooQix",
"BarBar",
"86",
"FooQix",
"88",
"89",
"FooBar",
"Qix",
"92",
"FooFoo",
"94",
"BarBar",
"Foo",
"Qix",
"Qix",
"Foo",
"Bar"};
@Test
public void testGenerator() {
FooBarQix fooBarQix = new FooBarQix();
assertEquals(getExpected(), fooBarQix.generate());
}
public String getExpected() {
StringBuilder builder = new StringBuilder();
for (String line : expected) {
builder.append(line);
builder.append("\n");
}
return builder.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment