[jboss-cvs] jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test ...
Shane Bryzak
Shane_Bryzak at symantec.com
Mon Feb 12 23:00:58 EST 2007
User: sbryzak2
Date: 07/02/12 23:00:58
Modified: examples/booking/src/org/jboss/seam/example/booking/test
BookingTest.java ChangePasswordTest.java
LoginTest.java
Log:
fixed unit tests
Revision Changes Path
1.44 +256 -254 jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test/BookingTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BookingTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test/BookingTest.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- BookingTest.java 17 Dec 2006 15:59:39 -0000 1.43
+++ BookingTest.java 13 Feb 2007 04:00:57 -0000 1.44
@@ -1,4 +1,4 @@
-//$Id: BookingTest.java,v 1.43 2006/12/17 15:59:39 gavin Exp $
+//$Id: BookingTest.java,v 1.44 2007/02/13 04:00:57 sbryzak2 Exp $
package org.jboss.seam.example.booking.test;
import java.util.Calendar;
@@ -32,7 +32,9 @@
protected void invokeApplication() throws Exception
{
Contexts.getSessionContext().set("user", new User("Gavin King", "foobar", "gavin"));
- invokeMethod("#{login.login}");
+ setValue("#{identity.username}", "gavin");
+ setValue("#{identity.password}", "foobar");
+ invokeMethod("#{identity.login}");
}
}.run();
1.16 +138 -136 jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test/ChangePasswordTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ChangePasswordTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test/ChangePasswordTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- ChangePasswordTest.java 17 Dec 2006 15:59:39 -0000 1.15
+++ ChangePasswordTest.java 13 Feb 2007 04:00:57 -0000 1.16
@@ -1,4 +1,4 @@
-//$Id: ChangePasswordTest.java,v 1.15 2006/12/17 15:59:39 gavin Exp $
+//$Id: ChangePasswordTest.java,v 1.16 2007/02/13 04:00:57 sbryzak2 Exp $
package org.jboss.seam.example.booking.test;
import org.jboss.seam.contexts.Contexts;
@@ -20,7 +20,9 @@
protected void invokeApplication() throws Exception
{
Contexts.getSessionContext().set("user", new User("Gavin King", "foobar", "gavin"));
- invokeMethod("#{login.login}");
+ setValue("#{identity.username}", "gavin");
+ setValue("#{identity.password}", "foobar");
+ invokeMethod("#{identity.login}");
}
}.run();
@@ -41,7 +43,7 @@
assert getValue("#{user.username}").equals("gavin");
assert getValue("#{user.password}").equals("foobar");
assert !Manager.instance().isLongRunningConversation();
- assert getValue("#{login.loggedIn}").equals(true);
+ assert getValue("#{identity.loggedIn}").equals(true);
}
@@ -69,7 +71,7 @@
assert getValue("#{user.username}").equals("gavin");
assert getValue("#{user.password}").equals("foobar");
assert !Manager.instance().isLongRunningConversation();
- assert getValue("#{login.loggedIn}").equals(true);
+ assert getValue("#{identity.loggedIn}").equals(true);
}
}.run();
@@ -96,7 +98,7 @@
assert getValue("#{user.username}").equals("gavin");
assert getValue("#{user.password}").equals("xxxyyy");
assert !Manager.instance().isLongRunningConversation();
- assert getValue("#{login.loggedIn}").equals(true);
+ assert getValue("#{identity.loggedIn}").equals(true);
}
@@ -125,7 +127,7 @@
assert getValue("#{user.username}").equals("gavin");
assert getValue("#{user.password}").equals("foobar");
assert !Manager.instance().isLongRunningConversation();
- assert getValue("#{login.loggedIn}").equals(true);
+ assert getValue("#{identity.loggedIn}").equals(true);
}
1.25 +88 -88 jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test/LoginTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LoginTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/booking/src/org/jboss/seam/example/booking/test/LoginTest.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- LoginTest.java 17 Dec 2006 15:59:39 -0000 1.24
+++ LoginTest.java 13 Feb 2007 04:00:57 -0000 1.25
@@ -1,4 +1,4 @@
-//$Id: LoginTest.java,v 1.24 2006/12/17 15:59:39 gavin Exp $
+//$Id: LoginTest.java,v 1.25 2007/02/13 04:00:57 sbryzak2 Exp $
package org.jboss.seam.example.booking.test;
import org.jboss.seam.Seam;
@@ -19,7 +19,7 @@
protected void invokeApplication()
{
assert !isSessionInvalid();
- assert getValue("#{login.loggedIn}").equals(false);
+ assert getValue("#{identity.loggedIn}").equals(false);
}
}.run();
@@ -30,14 +30,14 @@
protected void updateModelValues() throws Exception
{
assert !isSessionInvalid();
- setValue("#{user.username}", "gavin");
- setValue("#{user.password}", "foobar");
+ setValue("#{identity.username}", "gavin");
+ setValue("#{identity.password}", "foobar");
}
@Override
protected void invokeApplication()
{
- invokeMethod("#{login.login}");
+ invokeMethod("#{identity.login}");
}
@Override
@@ -47,7 +47,7 @@
assert getValue("#{user.username}").equals("gavin");
assert getValue("#{user.password}").equals("foobar");
assert !Manager.instance().isLongRunningConversation();
- assert getValue("#{login.loggedIn}").equals(true);
+ assert getValue("#{identity.loggedIn}").equals(true);
}
}.run();
@@ -58,7 +58,7 @@
protected void invokeApplication()
{
assert !isSessionInvalid();
- assert getValue("#{login.loggedIn}").equals(true);
+ assert getValue("#{identity.loggedIn}").equals(true);
}
}.run();
@@ -70,14 +70,14 @@
{
assert !Manager.instance().isLongRunningConversation();
assert !isSessionInvalid();
- invokeMethod("#{login.logout}");
+ invokeMethod("#{identity.logout}");
assert Seam.isSessionInvalid();
}
@Override
protected void renderResponse()
{
- assert getValue("#{login.loggedIn}").equals(false);
+ assert getValue("#{identity.loggedIn}").equals(false);
assert Seam.isSessionInvalid();
}
More information about the jboss-cvs-commits
mailing list