Do do not check unique in unsupported lists
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / YT1465Test.java
index 0593db3d32d1dc0bd0ad3839690068372a8b66b4..2b589e9719b432ab373c410496635144e7adf7d8 100644 (file)
@@ -7,42 +7,38 @@
  */
 package org.opendaylight.yangtools.yang.stmt;
 
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
 
 import java.util.Set;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 import org.opendaylight.yangtools.yang.model.api.stmt.CaseEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ChoiceEffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ContainerEffectiveStatement;
 
-public class YT1465Test extends AbstractYangTest {
+class YT1465Test extends AbstractYangTest {
     @Test
-    public void supportedLeafInChoiceAugment() throws Exception {
+    void supportedLeafInChoiceAugment() throws Exception {
         final var baz = assertBaz(StmtTestUtils.parseYangSource("/bugs/YT1465/foo.yang", null));
         final var schemas = baz.schemaTreeNodes();
         assertEquals(2, schemas.size());
         final var it = schemas.iterator();
 
-        final var first = it.next();
-        assertThat(first, instanceOf(CaseEffectiveStatement.class));
+        final var first = assertInstanceOf(CaseEffectiveStatement.class, it.next());
         assertEquals(QName.create("foo", "one"), first.argument());
 
-        final var second = it.next();
-        assertThat(second, instanceOf(CaseEffectiveStatement.class));
+        final var second = assertInstanceOf(CaseEffectiveStatement.class, it.next());
         assertEquals(QName.create("foo", "two"), second.argument());
     }
 
     @Test
-    public void unsupportedLeafInChoiceAugment() throws Exception {
+    void unsupportedLeafInChoiceAugment() throws Exception {
         final var baz = assertBaz(StmtTestUtils.parseYangSource("/bugs/YT1465/foo.yang", Set.of()));
         final var schemas = baz.schemaTreeNodes();
         assertEquals(1, schemas.size());
-        final var first = schemas.iterator().next();
-        assertThat(first, instanceOf(CaseEffectiveStatement.class));
+        final var first = assertInstanceOf(CaseEffectiveStatement.class, schemas.iterator().next());
         assertEquals(QName.create("foo", "one"), first.argument());
     }