@SuppressWarnings("unchecked")
private <C extends DataObject> Stream<LazyDataObjectModification<C>> streamModifiedChildren(
final Class<C> childType) {
- return getModifiedChildren().stream()
+ return modifiedChildren().stream()
.filter(child -> childType.isAssignableFrom(child.dataType()))
.map(child -> (LazyDataObjectModification<C>) child);
}
final DataTreeModification<Top> initialWrite = Iterables.getOnlyElement(events);
final DataObjectModification<? extends DataObject> initialNode = initialWrite.getRootNode();
verifyModification(initialNode,TOP_PATH.getPathArguments().iterator().next(),ModificationType.WRITE);
- assertEquals(TOP_INITIAL_DATA, initialNode.getDataAfter());
+ assertEquals(TOP_INITIAL_DATA, initialNode.dataAfter());
}
private static void verifyModification(final DataObjectModification<? extends DataObject> barWrite,
final DataObjectStep<?> pathArg, final ModificationType eventType) {
- assertEquals(pathArg.type(), barWrite.getDataType());
- assertEquals(eventType,barWrite.getModificationType());
- assertEquals(pathArg, barWrite.getIdentifier());
+ assertEquals(pathArg.type(), barWrite.dataType());
+ assertEquals(eventType,barWrite.modificationType());
+ assertEquals(pathArg, barWrite.step());
}
private <T extends DataObject> WriteTransaction putTx(final InstanceIdentifier<T> path, final T data) {
if (!matcher.apply(mod)) {
final var rootNode = mod.getRootNode();
fail("Received unexpected notification: type: %s, path: %s, before: %s, after: %s".formatted(
- rootNode.getModificationType(), mod.getRootPath().path(), rootNode.getDataBefore(),
- rootNode.getDataAfter()));
+ rootNode.modificationType(), mod.getRootPath().path(), rootNode.dataBefore(),
+ rootNode.dataAfter()));
return;
}
}
public static <T extends DataObject> @NonNull Matcher<T> match(final ModificationType type,
final InstanceIdentifier<T> path, final DataMatcher<T> checkDataBefore,
final DataMatcher<T> checkDataAfter) {
- return modification -> type == modification.getRootNode().getModificationType()
+ return modification -> type == modification.getRootNode().modificationType()
&& path.equals(modification.getRootPath().path())
- && checkDataBefore.apply(modification.getRootNode().getDataBefore())
- && checkDataAfter.apply(modification.getRootNode().getDataAfter());
+ && checkDataBefore.apply(modification.getRootNode().dataBefore())
+ && checkDataAfter.apply(modification.getRootNode().dataAfter());
}
public static <T extends DataObject> @NonNull Matcher<T> match(final ModificationType type,