import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
import org.opendaylight.yangtools.yang.data.impl.schema.Builders;
import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes;
import org.opendaylight.yangtools.yang.model.api.Module;
public void prepare() {
schemaContext = createTestContext();
assertNotNull("Schema context must not be null.", schemaContext);
- rootOper = RootModificationApplyOperation.from(SchemaAwareApplyOperation.from(schemaContext));
+ rootOper = RootModificationApplyOperation.from(SchemaAwareApplyOperation.from(schemaContext, TreeType.OPERATIONAL));
inMemoryDataTree = (InMemoryDataTree) InMemoryDataTreeFactory.getInstance().create();
inMemoryDataTree.setSchemaContext(schemaContext);
}
final InMemoryDataTreeModification modificationTree = inMemoryDataTree.takeSnapshot().newModification();
modificationTree.write(TestModel.TEST_PATH, cont1);
modificationTree.merge(TestModel.TEST_PATH, cont2);
+ modificationTree.ready();
inMemoryDataTree.validate(modificationTree);
final DataTreeCandidate prepare = inMemoryDataTree.prepare(modificationTree);