use of org.apache.sling.ide.impl.vlt.DeleteNodeCommand in project sling by apache.
the class DefaultBatcherTest method dataIsClearedBetweenCalls.
@Test
public void dataIsClearedBetweenCalls() {
batcher.add(new DeleteNodeCommand(mockRepo, credentials, "/content/branch", null));
batcher.get();
assertThat(batcher.get(), hasSize(0));
}
use of org.apache.sling.ide.impl.vlt.DeleteNodeCommand in project sling by apache.
the class DefaultBatcherTest method testMoreComprehensiveDeletesAreCompacted.
private void testMoreComprehensiveDeletesAreCompacted(String expected, String firstPath, String... otherPaths) {
batcher.add(new DeleteNodeCommand(mockRepo, credentials, firstPath, null));
for (String otherPath : otherPaths) {
batcher.add(new DeleteNodeCommand(mockRepo, credentials, otherPath, null));
}
List<Command<?>> batched = batcher.get();
assertThat(batched, hasSize(1));
Command<?> command = batched.get(0);
assertThat(command, instanceOf(DeleteNodeCommand.class));
assertThat(command.getPath(), equalTo(expected));
}
Aggregations