KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > hero > client > test > stress > UsersTests


1 /**
2  *
3  * Bonita
4  * Copyright (C) 1999 Bull S.A.
5  * Bull 68 route de versailles 78434 Louveciennes Cedex France
6  * Further information: bonita@objectweb.org
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21  * USA
22  *
23  *
24 --------------------------------------------------------------------------
25  * $Id: UsersTests.java,v 1.1 2004/07/30 14:57:58 mvaldes Exp $
26  *
27 --------------------------------------------------------------------------
28  */

29
30 package hero.client.test.stress;
31 import hero.interfaces.UserRegistration;
32 import hero.interfaces.UserRegistrationHome;
33 import hero.interfaces.UserRegistrationUtil;
34 import junit.framework.TestCase;
35 import junit.framework.TestSuite;
36
37 public class UsersTests extends TestCase {
38  
39     public UsersTests(String JavaDoc testname) {
40     super(testname);
41     }
42     
43     public static TestSuite suite() {
44     return new TestSuite(UsersTests.class);
45     }
46
47     public void setUp() throws Exception JavaDoc {
48     }
49     
50     public void testCreateUsers() throws Exception JavaDoc {
51     UserRegistrationHome urHome = UserRegistrationUtil.getHome();
52     UserRegistration userReg=urHome.create();
53     int i;
54     for (i=0;i<2500;i++)
55     {
56         userReg.userCreate("user"+i,"userpass"+i,"miguel.valdes-faura@ext.bull.net");
57         /*String startMail = "false";
58         String startJabber = "false";
59         String terminateMail = "false";
60         String terminateJabber = "false";
61         userReg.setUserProperty("user"+i,hero.util.EventConstants.START+"Mail",startMail);
62         userReg.setUserProperty("user"+i,hero.util.EventConstants.START+"Jabber",startJabber);
63         userReg.setUserProperty("user"+i,hero.util.EventConstants.TERMINATED+"Mail",terminateMail);
64         userReg.setUserProperty("user"+i,hero.util.EventConstants.TERMINATED+"Jabber",terminateJabber);*/

65     }
66         
67     }
68
69
70 }
71
Popular Tags