Пример #1
0
  public void testGetStoredFields() {
    assertStoredField(Item.class, FIELD_NAME, ITEM_NAME, String.class, true, false);
    assertStoredField(ItemParent.class, "_array", null, String.class, false, true);

    StoredClass itemStoredClass = itemStoredClass();
    StoredField storedField = itemStoredClass.storedField(FIELD_NAME, null);
    StoredField sameStoredField = itemStoredClass.getStoredFields()[0];
    StoredField otherStoredField = storedClass(ItemParent.class).getStoredFields()[0];
    Assert.equalsAndHashcode(storedField, sameStoredField, otherStoredField);

    Assert.isNull(itemStoredClass.storedField("", null));
  }
Пример #2
0
 public void testEqualsAndHashCode() {
   StoredClass clazz = itemStoredClass();
   StoredClass same = itemStoredClass();
   StoredClass other = db().storedClass(ItemParent.class);
   Assert.equalsAndHashcode(clazz, same, other);
 }