0 Replies Latest reply on Jul 18, 2012 12:16 PM by Raphael Lacerda

    Integration Test with Seam 2.2 - Cannot Create component with Page Scope

    Raphael Lacerda Newbie

      Simple test....




      class MyComponent{





      class MyComponentTest extends SeamTest



      public void initialTest(){

           new ComponentTest() {



                                    protected void testComponents()

                                              throws Exception



                                              MyComponent instance = (MyComponent) Component.getInstance(MyComponent.class, true);








      The test pass without any problem!


      Now, if i change the component scope to PAGE, the test fails. Seam cannot create this component anymore.


      Does anybody know why this is happening?






      class MyComponent{




      //Test fails =/ Component.getInstance(MyComponent.class, true) returns null