예제 #1
0
 /** FormattedEntityId. */
 @Test
 public void testTooLargeInt() throws Exception {
   try {
     ToolUtils.createEntityIdFromUserInputs(
         "['dummy', 'str1', 'str2', 2147483648, 10]", mFormattedLayout);
     fail("Should fail with EntityIdException.");
   } catch (EntityIdException eie) {
     assertEquals(
         "Invalid type for component 2147483648 at index 3 in kijiRowKey", eie.getMessage());
   }
 }
예제 #2
0
  @Test
  public void testNonNullFollowsNull() throws IOException {

    try {
      ToolUtils.createEntityIdFromUserInputs(
          "['dummy', 'str1', 'str2', null, 5]", mFormattedLayout);
      fail("Should fail with EntityIdException.");
    } catch (EntityIdException eie) {
      assertEquals("Non null component follows null component", eie.getMessage());
    }
  }