|
From: <tre...@us...> - 2007-08-06 23:44:38
|
Revision: 237
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=237&view=rev
Author: trevorolio
Date: 2007-08-06 16:44:42 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Another WebAPI test.
Modified Paths:
--------------
spaces/trunk/src/com/ogoglio/client/WebAPITests.java
Modified: spaces/trunk/src/com/ogoglio/client/WebAPITests.java
===================================================================
--- spaces/trunk/src/com/ogoglio/client/WebAPITests.java 2007-08-06 19:41:08 UTC (rev 236)
+++ spaces/trunk/src/com/ogoglio/client/WebAPITests.java 2007-08-06 23:44:42 UTC (rev 237)
@@ -14,6 +14,8 @@
public static final String GOOD_COOKIE = "trGoodCookie";
private static final String BAD_COOKIE = "badBacCookie";
+
+ private static final String GUEST_COOKIE = "guestMockCookie";
URI serviceURI = null;
@@ -49,6 +51,23 @@
public void tearDown() {
}
+
+ public void testWebAPIGuestAuthenticator() {
+
+ mockAuthFactory.authenticate(descriptor, GUEST_COOKIE);
+ modify().forward();
+
+ //###################################
+ startVerification();
+
+ WebAPIGuestAuthenticator auth = mockAuthFactory.authenticate(descriptor, GUEST_COOKIE);
+ assertNotNull(auth);
+ assertEquals(GUEST_COOKIE, auth.getAuthCookie());
+ assertNotNull(auth.getUsername());
+ assertNotNull(auth.getAccountDocument(true));
+ assertNotNull(auth.getAuthDocument(true));
+ }
+
public void testWebAPIAuthenticatorViaCookie() throws IOException, AuthenticationFailedException {
//mockWire should respond to good and bad cookies with good and bad auth docs
mockWire.fetchAuthenticatedXML(descriptor.getMeAuthURI(), BAD_COOKIE);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|