[seam-commits] Seam SVN: r7196 - trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jan 22 23:39:46 EST 2008


Author: norman.richards at jboss.com
Date: 2008-01-22 23:39:45 -0500 (Tue, 22 Jan 2008)
New Revision: 7196

Modified:
   trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java
Log:
fix seamspace test

Modified: trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java
===================================================================
--- trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java	2008-01-22 21:34:26 UTC (rev 7195)
+++ trunk/examples/seamspace/src/org/jboss/seam/example/seamspace/test/BlogTest.java	2008-01-23 04:39:45 UTC (rev 7196)
@@ -94,32 +94,42 @@
             setParameter("name", "Mr_Smiley");
             setParameter("blogId", "1");
          }         
-         
+
          @Override
-         protected void invokeApplication() throws Exception
+         protected void renderResponse() throws Exception
          {
-            assert invokeAction("#{blog.createComment}") == null;
-            
-            assert getValue("#{comment}") != null;
-            assert getValue("#{comment.blog}") != null;
+              assert getValue("#{selectedBlog}") != null;
+              assert getValue("#{selectedBlog.blogId}").equals(1);
          }
       }.run();
-      
+
       new FacesRequest("/comment.xhtml", cid)
       {
          @Override
-         protected void updateModelValues() throws Exception
-         {
-            setValue("#{comment.comment}", "I totally disagree with your blog entry!");
-         }
-         
-         @Override
          protected void invokeApplication() throws Exception
          {
-            assert invokeAction("#{blog.saveComment}") == null;
+            assert invokeAction("#{blog.createComment}") == null;
+            
+            assert getValue("#{comment}") != null;
+            assert getValue("#{comment.blog}") != null;
          }
       }.run();
       
+       new FacesRequest("/comment.xhtml", cid)
+       {
+          @Override
+          protected void updateModelValues() throws Exception
+          {
+             setValue("#{comment.comment}", "I totally disagree with your blog entry!");
+          }
+         
+          @Override
+          protected void invokeApplication() throws Exception
+          {
+             assert invokeAction("#{blog.saveComment}") == null;
+          }
+       }.run();
+      
       new FacesRequest()
       {
          @Override
@@ -128,6 +138,7 @@
             invokeAction("#{identity.logout}");
             assert getValue("#{identity.loggedIn}").equals(false);
          }
-      }.run();        
+      }.run();    
+      
    }
 }




More information about the seam-commits mailing list