[jboss-cvs] jboss-seam/examples/blog/src/test ...

Gavin King gavin.king at jboss.com
Tue May 29 22:35:51 EDT 2007


  User: gavin   
  Date: 07/05/29 22:35:51

  Modified:    examples/blog/src/test  BlogTest.java
  Log:
  security
  
  Revision  Changes    Path
  1.18      +17 -2     jboss-seam/examples/blog/src/test/BlogTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BlogTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/blog/src/test/BlogTest.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- BlogTest.java	30 May 2007 01:18:16 -0000	1.17
  +++ BlogTest.java	30 May 2007 02:35:51 -0000	1.18
  @@ -8,6 +8,7 @@
   import org.jboss.seam.jsf.SeamPhaseListener;
   import org.jboss.seam.jsf.TransactionalSeamPhaseListener;
   import org.jboss.seam.mock.SeamTest;
  +import org.jboss.seam.security.Identity;
   import org.testng.annotations.Test;
   
   import actions.BlogService;
  @@ -21,6 +22,20 @@
      @Test
      public void testPost() throws Exception
      {
  +      new FacesRequest()
  +      {
  +         @Override
  +         protected void updateModelValues() throws Exception
  +         {
  +            Identity.instance().setPassword("tokyo");
  +         }
  +         @Override
  +         protected void invokeApplication() throws Exception
  +         {
  +            Identity.instance().authenticate();
  +         }
  +      }.run();
  +      
         new FacesRequest("/post.xhtml")
         {
   
  
  
  



More information about the jboss-cvs-commits mailing list