コード例 #1
0
 public void testPossibleRaws() {
   super.testPossibleRaws();
   Enumeration<Long> them = it.possibleRaws();
   assertNull(them);
   ((LongPoemType) it).setRawRange(new Long(Long.MAX_VALUE - 5), (Long) null);
   them = it.possibleRaws();
   int count = 0;
   while (them.hasMoreElements()) {
     them.nextElement();
     count++;
   }
   if (it.getNullable()) assertEquals(6, count);
   else assertEquals(5, count);
   ((LongPoemType) it).setRawRange(new Long(2L), new Long(5L));
   them = it.possibleRaws();
   count = 0;
   while (them.hasMoreElements()) {
     them.nextElement();
     count++;
   }
   if (it.getNullable()) assertEquals(4, count);
   else assertEquals(3, count);
 }
コード例 #2
0
 /** Test full constructor. */
 public void testFullConstructor() {
   LongPoemType it2 = new MyLongPoemType(it.getNullable());
   assertEquals(it.getNullable(), it2.getNullable());
 }