import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-
import java.io.File;
import java.io.FileNotFoundException;
import java.net.URISyntaxException;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
import org.opendaylight.yangtools.yang.data.api.schema.tree.TipProducingDataTree;
+import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
import org.opendaylight.yangtools.yang.data.impl.RetestUtils;
import org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefContext;
import org.opendaylight.yangtools.yang.data.impl.leafref.LeafRefDataValidationFailedException;
private static QName leafrefLeafList;
- private static final Logger LOG = LoggerFactory.getLogger("");
+ private static final Logger LOG = LoggerFactory.getLogger(DataTreeCandidateValidatorTest.class);
private static final String NEW_LINE = System.getProperty("line.separator");
static {
}
private static void initDataTree() {
- inMemoryDataTree = InMemoryDataTreeFactory.getInstance().create();
+ inMemoryDataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.OPERATIONAL);
inMemoryDataTree.setSchemaContext(context);
final DataTreeModification initialDataTreeModification = inMemoryDataTree
private static void writeIntoMapEntry() {
- final Map<QName, Object> keys = new HashMap<QName, Object>();
+ final Map<QName, Object> keys = new HashMap<>();
keys.put(name, "New Project");
final NodeIdentifierWithPredicates mapEntryPath = new NodeIdentifierWithPredicates(
project, keys);
private static void writeMapEntry() {
- final Map<QName, Object> keys = new HashMap<QName, Object>();
+ final Map<QName, Object> keys = new HashMap<>();
keys.put(name, "New Project");
final NodeIdentifierWithPredicates mapEntryPath = new NodeIdentifierWithPredicates(
project, keys);
final QName qname, final String val) {
final NormalizedNodeAttrBuilder<NodeWithValue, Object, LeafSetEntryNode<Object>> leafSetEntryBuilder = Builders
.leafSetEntryBuilder();
- leafSetEntryBuilder.withNodeIdentifier(new NodeWithValue(qname, val));
+ leafSetEntryBuilder.withNodeIdentifier(new NodeWithValue<>(qname, val));
leafSetEntryBuilder.withValue(val);
return leafSetEntryBuilder.build();
}