Ejemplo n.º 1
0
  private void expectTokenForReadListToPrefereblyBeHeaderThanQuery(
      String headerAuthToken, String queryAuthToken, String authTokenExpected) {
    SpiderInstanceFactorySpy factorySpy = setupInstanceProviderWithFactorySpy();

    response = recordEndpoint.readRecordList(headerAuthToken, queryAuthToken, PLACE);

    SpiderRecordListReaderSpy spiderListReaderSpy = factorySpy.spiderRecordListReaderSpy;
    assertEquals(spiderListReaderSpy.authToken, authTokenExpected);
  }
Ejemplo n.º 2
0
 @Test
 public void testReadRecordListNotFound() {
   response = recordEndpoint.readRecordList(AUTH_TOKEN, AUTH_TOKEN, "place_NOT_FOUND");
   assertResponseStatusIs(Response.Status.NOT_FOUND);
 }
Ejemplo n.º 3
0
 @Test
 public void testReadRecordList() {
   response = recordEndpoint.readRecordList(AUTH_TOKEN, AUTH_TOKEN, PLACE);
   assertEntityExists();
   assertResponseStatusIs(Response.Status.OK);
 }