X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=yang%2Fyang-parser-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fstmt%2Frfc6020%2Feffective%2FConstraintDefinitionsTest.java;h=eec5b72ad0c10a73855edea28c141d49accdd367;hb=b212baa59f859732bd3a799425bb420035fe6154;hp=3d3baa895826dd08161f4bcd68c7fe5b716720f6;hpb=02d724c5ef8e51e7981a97f8418e4d6804aafe22;p=yangtools.git diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ConstraintDefinitionsTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ConstraintDefinitionsTest.java index 3d3baa8958..eec5b72ad0 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ConstraintDefinitionsTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ConstraintDefinitionsTest.java @@ -19,7 +19,7 @@ import java.net.URISyntaxException; import java.text.ParseException; import org.junit.Test; import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil; +import org.opendaylight.yangtools.yang.common.Revision; import org.opendaylight.yangtools.yang.data.util.ConstraintDefinitions; import org.opendaylight.yangtools.yang.model.api.ConstraintDefinition; import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode; @@ -45,10 +45,7 @@ public class ConstraintDefinitionsTest { final SchemaContext schemaContext = reactor.buildEffective(); assertNotNull(schemaContext); - final Module testModule = schemaContext.findModuleByName("foo", - SimpleDateFormatUtil.getRevisionFormat().parse("2016-09-20")); - assertNotNull(testModule); - + final Module testModule = schemaContext.findModule("foo", Revision.valueOf("2016-09-20")).get(); final LeafSchemaNode mandatoryLeaf1 = (LeafSchemaNode) testModule.getDataChildByName( QName.create(testModule.getQNameModule(), "mandatory-leaf-1")); assertNotNull(mandatoryLeaf1);