import static junit.framework.TestCase.assertFalse;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
+import org.junit.AfterClass;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.opendaylight.yangtools.util.UnmodifiableCollection;
import org.opendaylight.yangtools.yang.common.QName;
.withNodeIdentifier(new NodeIdentifier(MIN_MAX_LIST_QNAME))
.withChild(bazEntryNode).build();
+ private static SchemaContext schemaContext;
+
private DataTree inMemoryDataTree;
+ @BeforeClass
+ public static void beforeClass() {
+ schemaContext = YangParserTestUtils.parseYangResource("/bug-4454-test.yang");
+ }
+
+ @AfterClass
+ public static void afterClass() {
+ schemaContext = null;
+ }
+
@Before
public void prepare() {
- SchemaContext schemaContext = createTestContext();
- assertNotNull("Schema context must not be null.", schemaContext);
inMemoryDataTree = new InMemoryDataTreeFactory().create(DataTreeConfiguration.DEFAULT_OPERATIONAL,
schemaContext);
final DataTreeSnapshot initialDataTreeSnapshot = inMemoryDataTree.takeSnapshot();
inMemoryDataTree.commit(inMemoryDataTree.prepare(modificationTree));
}
- public static SchemaContext createTestContext() {
- return YangParserTestUtils.parseYangResource("/bug-4454-test.yang");
- }
-
@Test
public void minMaxListDeleteWriteTest() throws DataValidationFailedException {
final DataTreeModification modificationTree1 = inMemoryDataTree.takeSnapshot().newModification();