// Need to be fixed public void testDisableRemoteI() throws Exception { ddObj.getEntityHelper(bean).removeInterfaces(false); Thread.sleep(1000); assertNull(bean.getRemote()); assertEquals("", getClassAndInterfacePanel().getRemoteComponentTextField().getText().trim()); assertNull(bean.getHome()); assertEquals("", getClassAndInterfacePanel().getRemoteHomeTextField().getText().trim()); // assertEquals(false, getClassAndInterfacePanel().getRemoteInterfaceCheckBox().isSelected()); // check XML view Utils utils = new Utils(this); try { utils.checkInXML(ddObj, "<remote>cmp.CustomerRemote</remote>"); utils.checkInXML(ddObj, "<home>cmp.CustomerRemoteHome</home>"); fail("Remote elements are still displayd in text view."); } catch (AssertionFailedError ex) { // it's OK } // check files utils.save(ddObj); utils.checkFiles( "testDisableRemoteI", new String[] {"ejb-jar.xml"}, new String[] {"CustomerBean.java"}); // check tha interface files are deleted checkDeletedFiles("CustomerRemoteHome.java"); checkDeletedFiles("CustomerRemote.java"); checkDeletedFiles("CustomerRemoteBusiness.java"); }
// Need to be fixed public void testEnableRemoteI() throws Exception { ddObj.getEntityHelper(bean).addInterfaces(false); // add remote interface // check DD API Thread.sleep(1000); assertEquals("cmp.CustomerRemote", bean.getRemote()); assertEquals( "cmp.CustomerRemote", getClassAndInterfacePanel().getRemoteComponentTextField().getText()); assertEquals("cmp.CustomerRemoteHome", bean.getHome()); assertEquals( "cmp.CustomerRemoteHome", getClassAndInterfacePanel().getRemoteHomeTextField().getText()); // assertEquals(true, getClassAndInterfacePanel().getRemoteInterfaceCheckBox().isSelected()); // check XML view Utils utils = new Utils(this); utils.checkInXML(ddObj, "<remote>cmp.CustomerRemote</remote>"); utils.checkInXML(ddObj, "<home>cmp.CustomerRemoteHome</home>"); // check files utils.save(ddObj); utils.checkFiles( "testEnableRemoteI", new String[] {"ejb-jar.xml"}, new String[] {"CustomerBean.java", "CustomerRemoteHome.java", "CustomerRemote.java"}); }