assertGenerated(schema);
assertEquals(4, schema.getEStructuralFeatures().size()); // four attributes (one is a generated primary key)
{
DomainAttribute attribute = assertHasDomainAttribute(schema, "fruit");
assertEquals(attribute.getName(), "fruit");
assertEqualType(BuiltinDataTypes.getTypeString(), attribute.getEType());
}
{
DomainAttribute attribute = assertHasDomainAttribute(schema, "animal");
assertEquals(attribute.getName(), "animal");
assertEqualType(BuiltinDataTypes.getTypeString(), attribute.getEType());
}
{
DomainAttribute attribute = assertHasDomainAttribute(schema, "empty");
assertEquals(attribute.getName(), "empty");
assertEqualType(BuiltinDataTypes.getTypeString(), attribute.getEType());
}
{
DomainAttribute attribute = assertHasDomainAttribute(schema, "generated primary key");
assertEquals(attribute.getName(), "generated primary key");
assertTrue(attribute.isPrimaryKey());
// primary keys are always integer
assertEqualType(BuiltinDataTypes.getTypeInteger(), attribute.getEType());
}
}