@Test public void testGetCommands() { CommandExpectationGroup commandExpectationGroup = new CommandExpectationGroup(); commandExpectationGroup.addCommand("solo command 1"); commandExpectationGroup.addCommand("solo command 2"); commandExpectationGroup.addCommands( Arrays.asList(new String[] { "grouped command 1", "grouped command 2", "grouped command 3" })); commandExpectationGroup.addCommands(Arrays.asList(new String[] { "grouped command 4" })); commandExpectationGroup.addCommand("solo command 3"); commandExpectationGroup.addCommand("solo command 4"); commandExpectationGroup.addCommands(Arrays.asList(new String[] { "grouped command 5", "grouped command 6" })); assertThat(commandExpectationGroup.getCommands()).isEqualTo(Arrays.asList(new String[] { "solo command 1", "solo command 2", "grouped command 1", "grouped command 2", "grouped command 3", "grouped command 4", "solo command 3", "solo command 4", "grouped command 5", "grouped command 6" })); commandExpectationGroup = new CommandExpectationGroup(); commandExpectationGroup.addCommands(Arrays.asList(new String[] { "grouped command 1", "grouped command 2" })); commandExpectationGroup.addCommand("solo command 1"); commandExpectationGroup.addCommands(Arrays.asList(new String[] { "grouped command 3", "grouped command 4" })); commandExpectationGroup.addCommand("solo command 2"); assertThat(commandExpectationGroup.getCommands()).isEqualTo(Arrays.asList(new String[] { "grouped command 1", "grouped command 2", "solo command 1", "grouped command 3", "grouped command 4", "solo command 2" })); }
public List<String> getCommands() { return Collections.unmodifiableList(commands); }
CommandExpectationGroup { public List<String> getCommands() { return Collections.unmodifiableList(commands); } }
CommandExpectationGroup { public List<String> getCommands() { return Collections.unmodifiableList(commands); } CommandExpectationGroup(); protected  CommandExpectationGroup(final boolean maskCommands); }
CommandExpectationGroup { public List<String> getCommands() { return Collections.unmodifiableList(commands); } CommandExpectationGroup(); protected  CommandExpectationGroup(final boolean maskCommands); void addCommand(final String command); void addCommands(final List<String> commands); void addExpectation(final String expectation); void addExpectations(final List<String> expectations); List<String> getCommands(); List<String> getExpectations(); boolean maskCommands(); @Override String toString(); }
CommandExpectationGroup { public List<String> getCommands() { return Collections.unmodifiableList(commands); } CommandExpectationGroup(); protected  CommandExpectationGroup(final boolean maskCommands); void addCommand(final String command); void addCommands(final List<String> commands); void addExpectation(final String expectation); void addExpectations(final List<String> expectations); List<String> getCommands(); List<String> getExpectations(); boolean maskCommands(); @Override String toString();  }