1 25 26 package org.objectweb.jonas.jtests.clients.entity; 27 28 import org.objectweb.jonas.jtests.beans.ebasic.Simple; 29 import org.objectweb.jonas.jtests.beans.ebasic.SimpleHome; 30 import org.objectweb.jonas.jtests.util.JTestCase; 31 32 33 36 public abstract class B_BasicHomeInterface extends JTestCase { 37 38 protected static SimpleHome home = null; 39 40 public B_BasicHomeInterface(String name) { 41 super(name); 42 } 43 44 49 protected void setUp() { 50 super.setUp(); 51 useBeans("ebasic", true); 52 } 53 54 57 abstract public SimpleHome getHome(); 58 59 65 public void testFindByPK() throws Exception { 66 getHome().findByPrimaryKey("pk1"); 67 68 } 69 70 71 72 79 public void testCreateNewEntityFindByNameRemove() throws Exception { 80 getHome().create("pk100", 20, 6); 81 Simple entity2 = getHome().findByTestName("pk100"); 82 assertEquals(20, entity2.getInfo()); 83 entity2.remove(); 85 86 } 87 88 89 90 91 92 93 } 94 | Popular Tags |