package org.huihoo.ofbiz.smart.test;

import org.avaje.agentloader.AgentLoader;
import org.huihoo.ofbiz.smart.entity.EntityConfiguration;
import org.huihoo.ofbiz.smart.entity.ModelRegister;
import org.junit.Assert;
import org.junit.Test;

public class ModelRegisterTest {
  @Test
  public void testInit() {
    AgentLoader.loadAgentFromClasspath("ofbiz-smart-agent","debug=1;packages=org.huihoo.ofbiz.smart.test.model.**");
    EntityConfiguration config = ModelRegister.me().getConfiguration();
    Assert.assertNotNull(config);
  }
}

@@ -184,24 +184,76 @@
 lRegister;%0D%0A
+import org.huihoo.ofbiz.smart.test.model.Customer;%0D%0A
 import org.j
@@ -589,16 +589,79 @@
 nfig);%0D%0A
+    Customer customer = new Customer();%0D%0A    customer.save();%0D%0A
   %7D%0D%0A%7D%0D%0A

Update ModelRegister