use of org.apache.sling.ide.impl.vlt.AddOrUpdateNodeCommand in project sling by apache.
the class DefaultBatcherTest method identicalAddOrUpdatesAreCompacted.
@Test
public void identicalAddOrUpdatesAreCompacted() {
AddOrUpdateNodeCommand first = new AddOrUpdateNodeCommand(mockRepo, credentials, null, null, new ResourceProxy("/content"), null);
AddOrUpdateNodeCommand second = new AddOrUpdateNodeCommand(mockRepo, credentials, null, null, new ResourceProxy("/content"), null);
batcher.add(first);
batcher.add(second);
List<Command<?>> batched = batcher.get();
assertThat(batched, hasSize(1));
Command<?> command = batched.get(0);
assertThat(command, instanceOf(AddOrUpdateNodeCommand.class));
assertThat(command.getPath(), equalTo("/content"));
}
Aggregations