@@ -0,0 +1,1176 @@
+package lowmodel.attribute;%0A%0Aimport java.util.Arrays;%0A%0Aimport lowmodel.entity.BasicEntity;%0Aimport lowmodel.attribute.BasicAttribute;%0Aimport lowmodel.attribute.type.AttributeType;%0Aimport lowmodel.attribute.type.DatetimeTypes;%0Aimport lowmodel.attribute.type.StringTypes;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class EntityTest %7B%0A%0A%09@Test%0A%09public void testEntityCreation() throws Exception %7B%0A%09%09BasicEntity entity = new BasicEntity();%0A%09%09entity.setName(%22newEntity%22);%0A%09%09%0A%09%09BasicAttribute battr1 = new BasicAttribute();%0A%09%09battr1.setAttrType(AttributeType.STRING);%0A%09%09battr1.setSubAttributeType(StringTypes.VARCHAR);%0A%09%09battr1.setDefinition(%22attr1%22);%0A%09%09battr1.setKeyGroup(KeyGroup.PRIMARY_KEY);%0A%09%09battr1.setId(String.valueOf(System.currentTimeMillis()));%0A%0A%09%09BasicAttribute battr2 = new BasicAttribute();%0A%09%09battr2.setAttrType(AttributeType.DATE_TIME);%0A%09%09battr2.setSubAttributeType(DatetimeTypes.TIMESTAMP);%0A%09%09battr2.setDefinition(%22attr2%22);%0A%09%09battr2.setKeyGroup(KeyGroup.FOREIGN_KEY);%0A%09%09battr2.setId(String.valueOf(System.currentTimeMillis()));%0A%09%09%0A%09%09entity.setAttributes(Arrays.asList(battr1, battr2));%0A%09%09%0A%09%09assertEquals(entity.getAttributes().size(), 2);%0A%09%7D%0A%7D%0A

add entity test