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;
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());
}
() -> 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());
}
() -> 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());
}
/**
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());
}
/**