schemaDAO.save(attributeSchema);
}
@Test
public void checkForEnumType() {
RSchema schema = new RSchema();
schema.setType(AttributeSchemaType.Enum);
schema.setName("color");
Exception ex = null;
try {
schemaDAO.save(schema);
} catch (Exception e) {
ex = e;
}
assertNotNull(ex);
schema.setEnumerationValues("red" + AbstractSchema.enumValuesSeparator + "yellow");
schema.setEnumerationKeys("1" + AbstractSchema.enumValuesSeparator + "2");
schemaDAO.save(schema);
RSchema actual = schemaDAO.find(schema.getName(), RSchema.class);
assertNotNull(actual);
assertNotNull(actual.getEnumerationKeys());
assertFalse(actual.getEnumerationKeys().isEmpty());
}