KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > modules > admin > EmailPasswordReminderTest


1 /*
2  * Created on Jun 14, 2004
3  *
4  * TODO To change the template for this generated file go to
5  * Window - Preferences - Java - Code Generation - Code and Comments
6  */

7 package com.openedit.modules.admin;
8
9 import com.openedit.BaseTestCase;
10 import com.openedit.WebPageRequest;
11
12 /**
13  * @author mcgaha_b
14  *
15  * TODO To change the template for this generated type comment go to
16  * Window - Preferences - Java - Code Generation - Code and Comments
17  */

18 public class EmailPasswordReminderTest extends BaseTestCase {
19     
20     public EmailPasswordReminderTest(String JavaDoc arg0)
21     {
22         super(arg0);
23     }
24     
25     public void testEmailPasswordReminder() throws Exception JavaDoc
26     {
27         String JavaDoc base = System.getProperty("basedir");
28         if ( base == null)
29         {
30             System.setProperty("basedir","resources/test");
31         }
32         AdminModule adminModule = (AdminModule)getFixture().getModuleManager().getModule("Admin");
33         WebPageRequest context = getFixture().createPageRequest();
34         //context.setRequestParameter( "username", "admin" );
35
context.setRequestParameter( "to", "XXXXbuckeyes_reds@yahoo.com" );
36         
37         adminModule.emailPasswordReminder( context );
38
39         String JavaDoc status = (String JavaDoc)context.getPageValue("commandSucceeded");
40         assertTrue( "nouser".equals( status ));
41         //PasswordHelper passwordHelper = (PasswordHelper) context.getSessionValue( "passwordHelper" );
42
//assertNotNull(passwordHelper);
43

44     }
45 }
46
Popular Tags