import static org.hamcrest.CoreMatchers.startsWith;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.Revision;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
import org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition;
import org.opendaylight.yangtools.yang.stmt.AbstractYangTest;
-public class IdentityrefStatementTest extends AbstractYangTest {
+class IdentityrefStatementTest extends AbstractYangTest {
@Test
- public void testIdentityrefWithMultipleBaseIdentities() {
+ void testIdentityrefWithMultipleBaseIdentities() {
final var context = assertEffectiveModel("/rfc7950/identityref-stmt/foo.yang");
final Module foo = context.findModule("foo", Revision.of("2017-01-11")).get();
assertEquals(3, identities.size());
final LeafSchemaNode idrefLeaf = (LeafSchemaNode) foo.getDataChildByName(QName.create(foo.getQNameModule(),
- "idref-leaf"));
+ "idref-leaf"));
final IdentityrefTypeDefinition idrefType = (IdentityrefTypeDefinition) idrefLeaf.getType();
final var referencedIdentities = idrefType.getIdentities();
assertEquals(3, referencedIdentities.size());
}
@Test
- public void testInvalidYang10() {
+ void testInvalidYang10() {
assertInvalidSubstatementException(startsWith("Maximal count of BASE for TYPE is 1, detected 3."),
- "/rfc7950/identityref-stmt/foo10.yang");
+ "/rfc7950/identityref-stmt/foo10.yang");
}
}