5 Replies Latest reply on Jan 7, 2008 8:11 AM by Diego Coronel

    TestNG  problems

    Diego Coronel Apprentice

      hi, im trying to make some tests and im getting this error:

      INFO [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      INFO [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
      INFO [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
      INFO [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      INFO [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {}
      INFO [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
      FAILED CONFIGURATION: @BeforeMethod begin
      java.lang.IllegalArgumentException: Could not invoke method by reflection: FacesSecurityEvents.initCredentialsFromCookie(org.jboss.seam.security.Identity) with parameters: (org.jboss.seam.Component) on: org.jboss.seam.security.FacesSecurityEvents
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:31)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
       at org.jboss.seam.Component.callComponentMethod(Component.java:2082)
       at org.jboss.seam.core.Events.raiseEvent(Events.java:85)
       at org.jboss.seam.Component.newInstance(Component.java:1969)
       at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
       at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
       at org.jboss.seam.contexts.Lifecycle.beginSession(Lifecycle.java:187)
       at org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:124)
       at org.jboss.seam.mock.BaseSeamTest.begin(BaseSeamTest.java:920)
       at org.jboss.seam.mock.SeamTest.begin(SeamTest.java:28)
      Caused by: java.lang.IllegalArgumentException: argument type mismatch
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
       ... 34 more
      ... Removed 28 stack frames
      SKIPPED CONFIGURATION: @AfterMethod end
      SKIPPED CONFIGURATION: @AfterClass cleanup
      SKIPPED: testRegisterComponent
      


      my testClass:

      public class PaisTest extends SeamTest {
      
       @Test
       public void testRegisterComponent() throws Exception{
       new ComponentTest() {
       protected void testComponents() throws Exception {
       Manager.instance().initializeTemporaryConversation();
      
       Init.instance().setJndiPattern("fmtam_idoctor_web/#{ejbName}/local");
       setValue("#{paisBean.pais.txPais}", "TesteSeam");
       setValue("#{paisBean.pais.idPais}", 465);
      
       assert invokeMethod("#{paisBean.prepararEdicao()}").equals("sucesso");
       assert invokeMethod("#{paisBean.update()}").equals("sucesso");
      
       }
       }.run();
       }
      
      }
      
      
      
      


      anyone know ?