Skip to content

Instantly share code, notes, and snippets.

@wsoczynski
Created March 16, 2013 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsoczynski/5178252 to your computer and use it in GitHub Desktop.
Save wsoczynski/5178252 to your computer and use it in GitHub Desktop.
public class GenerateTest {
@Test
public void testGenerate() {
//given
Set<Integer> expected = new LinkedHashSet<Integer>();
for (int i = 1; i < 101; i++) {
expected.add(i);
}
//when
ContiguousSet<Integer> input = ContiguousSet.create(Range.closed(1, 100), DiscreteDomain.integers());
//then
assertTrue(Sets.difference(input, expected).isEmpty());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment