0 Replies Latest reply on May 15, 2009 10:17 PM by israel.bgf

    UnitTest Seam

    israel.bgf
      How can i unitTest a method like this:

      @Name("personBO")
      public class PersonBO{

      @In
      EntityManager em;

      @In
      FacesMessages facesMessages;

      public void persist(Person p){
      em.persist(p);
      facesMessages.add("Sucess!" + p.getName());
      }
      }

      How would i mock the facesMessages? How could i confirm if the message is "Sucess!Jhon"? To use the seam-container outside the web, i just need to have all the libs in the classpath?

      Thks