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