User: starksm 
  Date: 01/06/21 21:31:43

  Modified:    src/main/org/jboss/test/security/test TestEJBSpec.java
  Log:
  Add test of the unauthenticated-principal tag
  
  Revision  Changes    Path
  1.6       +4 -3      jbosstest/src/main/org/jboss/test/security/test/TestEJBSpec.java
  
  Index: TestEJBSpec.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/security/test/TestEJBSpec.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestEJBSpec.java  2001/06/15 08:48:25     1.5
  +++ TestEJBSpec.java  2001/06/22 04:31:43     1.6
  @@ -15,7 +15,7 @@
   deployment unit. These test the basic role based access model.
   
   @author [EMAIL PROTECTED]
  -@version $Revision: 1.5 $
  +@version $Revision: 1.6 $
   */
   public class TestEJBSpec extends junit.framework.TestCase
   {
  @@ -46,6 +46,7 @@
       public void testGetCallerPrincipal() throws Exception
       {
           logout();
  +        System.out.println("+++ testGetCallerPrincipal()");
           InitialContext jndiContext = new InitialContext();
           Object obj = jndiContext.lookup("spec.UnsecureStatelessSession2");
           obj = PortableRemoteObject.narrow(obj, StatelessSessionHome.class);
  @@ -57,12 +58,12 @@
           try
           {
               // This should fail because echo calls getCallerPrincipal()
  -            bean.echo("Hello");
  +            bean.echo("Hello from nobody?");
               fail("Was able to call StatelessSession.echo");
           }
           catch(RemoteException e)
           {
  -            System.out.println("echo failed");
  +            System.out.println("echo failed as expected");
           }
           bean.remove();
   
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to