use of org.codice.alliance.nsili.common.UCO.State in project alliance by codice.
the class GetRelatedFilesRequestImplTest method testCompleteNoPort.
@Test
public void testCompleteNoPort() throws Exception {
NameListHolder locations = new NameListHolder();
GetRelatedFilesRequestImpl noPortRequest = new GetRelatedFilesRequestImpl(getTestMetacards(), getTestFileLocation(), "THUMBNAIL", null);
noPortRequest.setHttpClient(mockHttpClient);
State state = noPortRequest.complete(locations);
assertValidState(state, locations);
}
use of org.codice.alliance.nsili.common.UCO.State in project alliance by codice.
the class GetRelatedFilesRequestImplTest method testComplete204.
@Test
public void testComplete204() throws Exception {
when(mockHttpClient.execute(any(HttpUriRequest.class))).thenReturn(getGoodResponse(204));
NameListHolder locations = new NameListHolder();
State state = relatedFilesRequest.complete(locations);
assertValidState(state, locations);
}
use of org.codice.alliance.nsili.common.UCO.State in project alliance by codice.
the class GetRelatedFilesRequestImplTest method testCompleteBadStatus.
@Test
public void testCompleteBadStatus() throws Exception {
when(mockHttpClient.execute(any(HttpUriRequest.class))).thenReturn(getBadResponse());
NameListHolder locations = new NameListHolder();
State state = relatedFilesRequest.complete(locations);
assertValidStateNoLocs(state, locations);
}
use of org.codice.alliance.nsili.common.UCO.State in project alliance by codice.
the class GetRelatedFilesRequestImplTest method testComplete200.
@Test
public void testComplete200() throws Exception {
when(mockHttpClient.execute(any(HttpUriRequest.class))).thenReturn(getGoodResponse(200));
NameListHolder locations = new NameListHolder();
State state = relatedFilesRequest.complete(locations);
assertValidState(state, locations);
}
use of org.codice.alliance.nsili.common.UCO.State in project alliance by codice.
the class GetRelatedFilesRequestImplTest method testNotThumbnailType.
@Test
public void testNotThumbnailType() throws Exception {
NameListHolder locations = new NameListHolder();
GetRelatedFilesRequestImpl noPortRequest = new GetRelatedFilesRequestImpl(getBadMetacards(), getTestFileLocation(), "OVERVIEW", null);
noPortRequest.setHttpClient(mockHttpClient);
State state = noPortRequest.complete(locations);
assertValidStateNoLocs(state, locations);
}
Aggregations