Skip to content

Instantly share code, notes, and snippets.

@rastadrian
Last active May 12, 2017 02:32
Show Gist options
  • Select an option

  • Save rastadrian/5851976c4802d4d84463c7c8de4fae2b to your computer and use it in GitHub Desktop.

Select an option

Save rastadrian/5851976c4802d4d84463c7c8de4fae2b to your computer and use it in GitHub Desktop.
Permuterator Test
public class PermuteratorTest {
private Permuterator permuterator;
private Permuterator.Validator validator;
@Before
public void setUp() throws Exception {
permuterator = new Permuterator();
validator = mock(Permuterator.Validator.class);
}
@Test
public void permute() throws Exception {
permuterator.permute(Arrays.asList("A", "B", "C"), 4, validator);
verify(validator, times(81)).validatePermutation(any());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment