Exemplo n.º 1
0
 @Test
 public void testCreateRecordConversionException() {
   response =
       recordEndpoint.createRecordUsingAuthTokenWithRecord(
           "someToken78678567", PLACE, jsonToCreateFromConversionException);
   assertResponseStatusIs(Response.Status.BAD_REQUEST);
 }
Exemplo n.º 2
0
 @Test
 public void testCreateNonExistingRecordType() {
   String type = "recordType_NON_EXCISTING";
   response =
       recordEndpoint.createRecordUsingAuthTokenWithRecord(
           "dummyNonAuthorizedToken", type, jsonToCreateFrom);
   assertResponseStatusIs(Response.Status.NOT_FOUND);
 }
Exemplo n.º 3
0
 @Test
 public void testCreateRecordUnauthorized() {
   setNotAuthorized();
   response =
       recordEndpoint.createRecordUsingAuthTokenWithRecord(
           "dummyNonAuthorizedToken", PLACE, jsonToCreateFrom);
   assertResponseStatusIs(Response.Status.FORBIDDEN);
 }