Examples of CMRBugManagerEJB


Examples of org.jboss.test.cmp2.cmr.interfaces.CMRBugManagerEJB

      CMRBugManagerEJBHome home = (CMRBugManagerEJBHome)
         PortableRemoteObject.narrow(ref, CMRBugManagerEJBHome.class);

      getLog().debug("creating CMRBugManagerEJB");
      CMRBugManagerEJB cmrBugManager = home.create();
      getLog().debug("created CMRBugManagerEJB");

      SortedMap cmrBugs = new TreeMap();
      cmrBugs.put("1", "one");
      cmrBugs.put("1.1", "one.one");
      cmrBugs.put("1.2", "one.two");
      cmrBugs.put("1.3", "one.three");

      getLog().debug("creating " + cmrBugs.size() + " CMR bugs");
      cmrBugManager.createCMRBugs(cmrBugs);
      getLog().debug("created " + cmrBugs.size() + " CMR bugs");

      Iterator i = cmrBugs.entrySet().iterator();
      while(i.hasNext())
      {
         Map.Entry entry = (Map.Entry)i.next();

         String[] parentIdAndDescription =
            cmrBugManager.getParentFor((String)entry.getKey());
         if(!entry.getKey().equals("1"))
         {
            assertTrue("Child has not Parent! cmr post create updates NOT WRITTEN! " + entry.getKey(),
               parentIdAndDescription != null);
         } // end of if ()
View Full Code Here

Examples of org.jboss.test.cmp2.cmr.interfaces.CMRBugManagerEJB

    */
   public void testLoadFKState() throws Exception
   {
      Object ref = getInitialContext().lookup("CMRBugManager");
      CMRBugManagerEJBHome home = (CMRBugManagerEJBHome)PortableRemoteObject.narrow(ref, CMRBugManagerEJBHome.class);
      CMRBugManagerEJB manager = home.create();

      try
      {
         // create bugs
         manager.setupLoadFKState();

         // update
         manager.moveLastNodeBack();

         // check results
         assertTrue("The last element is the last in the chain.", !manager.lastHasNextNode());
      }
      finally
      {
         manager.tearDownLoadFKState();
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.