Examples of MyEntityHome


Examples of org.jboss.seam.test.unit.component.MyEntityHome

      MockServletContext servletContext = new MockServletContext();
      ServletLifecycle.beginApplication(servletContext);
      new Initialization( servletContext ).create().init();
      Lifecycle.beginCall();
      Contexts.getEventContext().set(Seam.getComponentName(Transaction.class), new NoTransaction());
      MyEntityHome myEntityHome = (MyEntityHome) Component.getInstance("myEntityHome");
      assert myEntityHome != null;
      // verify that the reference to new-instance remains unparsed
      Assert.assertEquals(myEntityHome.getNewInstance().getExpressionString(), "#{simpleEntity}");
      // verify that the message string for the created/updated/deleted message remains unparsed
      Assert.assertEquals(myEntityHome.getCreatedMessage().getExpressionString(), "You #{'created'} it! Yeah!");
      // verify that the id is parsed prior to assignment
      Assert.assertEquals(String.valueOf(myEntityHome.getId()), "11");
     
      ServletLifecycle.endApplication();
   }
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.