2 Replies Latest reply on May 6, 2008 4:56 PM by Edwin van der Elst

    TestNG & @In problems

    Edwin van der Elst Newbie

      I have problems getting the @In to work during testing.

      First some code:

      public class DummyBean {
         @In(value="user") String user; 
         public String test() {
            return "hello "+user ;

      Test code:

         public void testAction() throws Exception {
            new ComponentTest() {
               protected void testComponents() throws Exception {
                  setValue("#{user}", "x");
                  assert invokeMethod("#{dummy.test}").equals("hello x");

      I get the following error:

      javax.el.ELException: org.jboss.seam.RequiredException: @In attribute requires non-null value: dummy.user

      I tried with
      and dummy.user, but that also doesn't work.

      Has anyone got a clue how to inject a simple String value within a test?