X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Futil%2FRefineHolderTest.java;h=0357815419c4d02c0fe8c664830d91997d868183;hb=42abb28b99a02f9580f4676ce5c315628e5bcd24;hp=ee2d7facbee4ceb61460ed723633f3849ce2aceb;hpb=93e8c16d8deff8cd2935d09c445d2d7082503cb4;p=yangtools.git diff --git a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/util/RefineHolderTest.java b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/util/RefineHolderTest.java index ee2d7facbe..0357815419 100644 --- a/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/util/RefineHolderTest.java +++ b/yang/yang-parser-impl/src/test/java/org/opendaylight/yangtools/yang/parser/util/RefineHolderTest.java @@ -11,7 +11,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; - +import com.google.common.base.Optional; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; @@ -26,6 +26,10 @@ import org.opendaylight.yangtools.yang.parser.builder.api.RefineBuilder; import org.opendaylight.yangtools.yang.parser.builder.impl.RefineHolderImpl; import org.opendaylight.yangtools.yang.parser.builder.impl.UnknownSchemaNodeBuilderImpl; +/** + * @deprecated Pre-Beryllium implementation, scheduled for removal. + */ +@Deprecated public class RefineHolderTest { private RefineHolderImpl rh; @@ -130,13 +134,17 @@ public class RefineHolderTest { @Test public void testMustEqualsBranch() { assertEquals("rh should equal to rh1", rh, rh1); - rh1.setMust(new MustDefinitionImpl("mustStr1", "description1", "reference1", "errorAppTag1", "errorMessage1")); + rh1.setMust(MustDefinitionImpl.create("mustStr1", Optional.of("description1"), Optional.of("reference1"), + Optional.of("errorAppTag1"), Optional.of("errorMessage1"))); assertFalse("rh shouldn't equal to rh1", rh.equals(rh1)); - rh.setMust(new MustDefinitionImpl("mustStr1", "description1", "reference1", "errorAppTag1", "errorMessage1")); + rh.setMust(MustDefinitionImpl.create("mustStr1", Optional.of("description1"), Optional.of("reference1"), + Optional.of("errorAppTag1"), Optional.of("errorMessage1"))); assertEquals("rh should equal to rh1", rh, rh1); - rh.setMust(new MustDefinitionImpl("mustStr", "description", "reference", "errorAppTag", "errorMessage")); + rh.setMust(MustDefinitionImpl.create("mustStr", Optional.of("description"), Optional.of("reference"), + Optional.of("errorAppTag"), Optional.of("errorMessage"))); assertFalse("rh shouldn't equal to rh1", rh.equals(rh1)); - rh1.setMust(new MustDefinitionImpl("mustStr", "description", "reference", "errorAppTag", "errorMessage")); + rh1.setMust(MustDefinitionImpl.create("mustStr", Optional.of("description"), Optional.of("reference"), + Optional.of("errorAppTag"), Optional.of("errorMessage"))); } @Test @@ -163,7 +171,7 @@ public class RefineHolderTest { rh1.setReference("reference"); } - private URI getUri(final String uri) { + private static URI getUri(final String uri) { URI simpleUri = null; boolean instantionated = false; try {