use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class ProcessingDetailsImplTest method testInequalityOfHashCodesForUnequalExceptions.
@Test
public void testInequalityOfHashCodesForUnequalExceptions() {
String sourceId = "test source";
List<String> warning = Collections.singletonList("warning");
Exception exception = new UnsupportedQueryException("We do not support this query");
Exception differentException = new UnsupportedQueryException("We do not support this query either");
ProcessingDetails processingDetails = new ProcessingDetailsImpl(sourceId, exception, warning);
ProcessingDetails processingDetailsWithDifferentException = new ProcessingDetailsImpl(sourceId, differentException, warning);
assertThat("\nThe hashCodes of ProcessingDetails with unequal exceptions should\n" + "not have been equal, but were.\n", processingDetails.hashCode(), not(processingDetailsWithDifferentException.hashCode()));
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class ProcessingDetailsImplTest method testInequalityOfExceptions.
@Test
public void testInequalityOfExceptions() {
String sourceId = "test source";
List<String> warning = Collections.singletonList("warning");
Exception exception = new UnsupportedQueryException("We do not support this query");
Exception differentException = new UnsupportedQueryException("We do not support this query either");
ProcessingDetails processingDetails = new ProcessingDetailsImpl(sourceId, exception, warning);
ProcessingDetails processingDetailsWithDifferentException = new ProcessingDetailsImpl(sourceId, differentException, warning);
assertThat(processingDetails, is(not(processingDetailsWithDifferentException)));
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class ProcessingDetailsImplTest method testInequalityOfHashCodesForUnequalSourceIds.
@Test
public void testInequalityOfHashCodesForUnequalSourceIds() {
String sourceId = "test source";
String differentSourceId = "different test source";
Exception exception = new UnsupportedQueryException("We do not support this query");
List<String> warning = Collections.singletonList("warning");
ProcessingDetails processingDetails = new ProcessingDetailsImpl(sourceId, exception, warning);
ProcessingDetails processingDetailsWithDifferentSourceId = new ProcessingDetailsImpl(differentSourceId, exception, warning);
assertThat("\nThe hashCodes of ProcessingDetails with unequal sourceIds should\n" + "not have been equal, but were.\n", processingDetails.hashCode(), not(processingDetailsWithDifferentSourceId.hashCode()));
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class ProcessingDetailsImplTest method testEquality.
@Test
public void testEquality() {
Exception exception = new UnsupportedQueryException("We do not support this query");
ProcessingDetails processingDetails = new ProcessingDetailsImpl("test source", exception, "warning");
ProcessingDetails identicalProcessingDetails = new ProcessingDetailsImpl("test source", exception, "warning");
assertThat(processingDetails, is(identicalProcessingDetails));
}
use of ddf.catalog.operation.impl.ProcessingDetailsImpl in project ddf by codice.
the class ProcessingDetailsImplTest method testInequalityOfHashCodesForUnequalWarnings.
@Test
public void testInequalityOfHashCodesForUnequalWarnings() {
String sourceId = "test source";
Exception exception = new UnsupportedQueryException("We do not support this query");
List<String> warning = Collections.singletonList("warning");
List<String> differentWarning = Collections.singletonList("different warning");
ProcessingDetails processingDetails = new ProcessingDetailsImpl(sourceId, exception, warning);
ProcessingDetails processingDetailsWithDifferentWarnings = new ProcessingDetailsImpl(sourceId, exception, differentWarning);
assertThat("\nThe hashCodes of ProcessingDetails with unequal warnings should not\n" + "have been equal, but were.\n", processingDetails.hashCode(), not(processingDetailsWithDifferentWarnings.hashCode()));
}
Aggregations