Remove RestconfError.ErrorTag
[netconf.git] / restconf / restconf-nb-rfc8040 / src / test / java / org / opendaylight / restconf / nb / rfc8040 / utils / parser / YangInstanceIdentifierDeserializerTest.java
index 31217280cd74a4d666c50c6a9d0e41cc61201c91..273b9e63d95b16bd2b6f844c89f73f049e7e4464 100644 (file)
@@ -23,8 +23,8 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
-import org.opendaylight.restconf.common.errors.RestconfError;
 import org.opendaylight.restconf.nb.rfc8040.TestRestconfUtils;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
 import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.Revision;
@@ -399,7 +399,7 @@ public class YangInstanceIdentifierDeserializerTest {
         RestconfDocumentedException ex = assertThrows(RestconfDocumentedException.class,
             () -> YangInstanceIdentifierDeserializer.create(SCHEMA_CONTEXT, "deserializer-test:contA/leafB"));
         assertEquals("Not expected error type", ErrorType.PROTOCOL, ex.getErrors().get(0).getErrorType());
-        assertEquals("Not expected error tag", RestconfError.ErrorTag.DATA_MISSING,
+        assertEquals("Not expected error tag", ErrorTag.DATA_MISSING,
             ex.getErrors().get(0).getErrorTag());
     }
 
@@ -414,7 +414,7 @@ public class YangInstanceIdentifierDeserializerTest {
             () -> YangInstanceIdentifierDeserializer.create(SCHEMA_CONTEXT,
                 "deserializer-test:list-no-key/disabled=false"));
         assertEquals("Not expected error type", ErrorType.PROTOCOL, ex.getErrors().get(0).getErrorType());
-        assertEquals("Not expected error tag", RestconfError.ErrorTag.DATA_MISSING,
+        assertEquals("Not expected error tag", ErrorTag.DATA_MISSING,
             ex.getErrors().get(0).getErrorTag());
     }
 
@@ -478,9 +478,8 @@ public class YangInstanceIdentifierDeserializerTest {
             () -> YangInstanceIdentifierDeserializer.create(SCHEMA_CONTEXT,
                     "deserializer-test:list-multiple-keys=%3Afoo/string-value"));
         assertEquals("Not expected error type", ErrorType.PROTOCOL, ex.getErrors().get(0).getErrorType());
-        assertEquals("Not expected error tag", RestconfError.ErrorTag.MISSING_ATTRIBUTE,
+        assertEquals("Not expected error tag", ErrorTag.MISSING_ATTRIBUTE,
             ex.getErrors().get(0).getErrorTag());
-        assertEquals("Not expected error status code", 400, ex.getErrors().get(0).getErrorTag().getStatusCode());
     }
 
     /**
@@ -534,9 +533,8 @@ public class YangInstanceIdentifierDeserializerTest {
         RestconfDocumentedException ex = assertThrows(RestconfDocumentedException.class,
             () -> YangInstanceIdentifierDeserializer.create(SCHEMA_CONTEXT, "deserializer-test:leaf-list-0="));
         assertEquals("Not expected error type", ErrorType.PROTOCOL, ex.getErrors().get(0).getErrorType());
-        assertEquals("Not expected error tag", RestconfError.ErrorTag.MISSING_ATTRIBUTE,
+        assertEquals("Not expected error tag", ErrorTag.MISSING_ATTRIBUTE,
             ex.getErrors().get(0).getErrorTag());
-        assertEquals("Not expected error status code", 400, ex.getErrors().get(0).getErrorTag().getStatusCode());
     }
 
     /**