use of org.sakuli.exceptions.SakuliForwarderRuntimeException in project sakuli by ConSol.
the class NagiosExceptionBuilderTest method testBuildTransferException.
@Test
public void testBuildTransferException() throws Exception {
GearmanJobResult result = mock(GearmanJobResult.class);
when(result.getExceptions()).thenReturn("exceptions".getBytes());
when(result.getWarnings()).thenReturn("warnings".getBytes());
SakuliForwarderRuntimeException sakuliForwarderException = NagiosExceptionBuilder.buildTransferException("localhost", 4370, result);
assertEquals(sakuliForwarderException.getMessage(), "something went wrong during the transfer of the results to the gearman forwarder 'localhost:'4370':\n" + "EXCEPTIONS:\n" + "exceptions\n" + "WARNINGS:\n" + "warnings\n");
}
Aggregations