コード例 #1
0
 /**
  * Checks {@link IssueIndexedRecord#get()} throws {@link IndexOutOfBoundsException}, when any
  * other than 0 is passed as index argument
  */
 @Test(expected = IndexOutOfBoundsException.class)
 public void testGetIndexOutOfBoundException() {
   IssueIndexedRecord indexedRecord = new IssueIndexedRecord(testJson, testSchema);
   indexedRecord.get(3);
 }
コード例 #2
0
 /** Checks {@link IssueIndexedRecord#put()} put field value correctly when 0 is passed as index */
 @Test
 public void testPut() {
   IssueIndexedRecord indexedRecord = new IssueIndexedRecord(testJson, null);
   indexedRecord.put(0, testJson);
   assertEquals(testJson, indexedRecord.get(0));
 }
コード例 #3
0
 /**
  * Checks {@link IssueIndexedRecord#get()} returns json field value, when 0 is passed as index
  * argument
  */
 @Test
 public void testGet() {
   IssueIndexedRecord indexedRecord = new IssueIndexedRecord(testJson, testSchema);
   assertEquals(testJson, indexedRecord.get(0));
 }