use of org.opendaylight.netconf.mdsal.connector.ops.get.GetConfig in project netconf by opendaylight.
the class NetconfMDSalMappingTest method testIncorrectGet.
@Test
public void testIncorrectGet() throws Exception {
DocumentedException ex = assertThrows(DocumentedException.class, () -> executeOperation(new GetConfig(SESSION_ID_FOR_REPORTING, getCurrentSchemaContext(), getTransactionProvider()), "messages/mapping/bad_getConfig.xml"));
assertEquals(ErrorSeverity.ERROR, ex.getErrorSeverity());
assertEquals(ErrorTag.OPERATION_FAILED, ex.getErrorTag());
assertEquals(ErrorType.APPLICATION, ex.getErrorType());
ex = assertThrows(DocumentedException.class, () -> executeOperation(new GetConfig(SESSION_ID_FOR_REPORTING, getCurrentSchemaContext(), getTransactionProvider()), "messages/mapping/bad_namespace_getConfig.xml"));
assertEquals(ErrorSeverity.ERROR, ex.getErrorSeverity());
assertEquals(ErrorTag.OPERATION_FAILED, ex.getErrorTag());
assertEquals(ErrorType.APPLICATION, ex.getErrorType());
}
Aggregations