0 Replies Latest reply on Jul 23, 2008 1:15 AM by tszpinda

    TestNg & extended identity

    tszpinda

      Hi,


      Got problem with an extended identity when testing. It works fine in an application but doesn't in the test.


      in the authenticate method:


      public boolean authenticate(){
        identity.addRole("ADMIN");
        assert identity.hasRole("ADMIN")==true;
      }




      and not sure why everything is ok when running an application, but assert fails during the test


      My custom identity:


      @Name(org.jboss.seam.security.identity)
      @Scope(value=ScopeType.SESSION)
      @Install(precedence = Install.APPLICATION)
      @BypassInterceptors
      @Startup
      public class User extends RuleBasedIdentity{
           private String customerCode;
      }




      Any help much appreciated!


      Thank you,
      Tomek