01: package hero.client.test;
02:
03: import hero.interfaces.*;
04:
05: import junit.framework.*;
06:
07: public class DbInit extends TestCase {
08:
09: private BnUserHome uhome;
10: private BnAuthRoleHome arhome;
11:
12: public DbInit(String testname) {
13: super (testname);
14: }
15:
16: public static TestSuite suite() {
17:
18: return new TestSuite(DbInit.class);
19: }
20:
21: public void setUp() throws Exception {
22: }
23:
24: public void testDbInit() throws Exception {
25: InsertAuthRoleUserHome lHome = InsertAuthRoleUserUtil.getHome();
26: InsertAuthRoleUser lBean = (InsertAuthRoleUser) lHome.create();
27: lBean.initializeUser("admin", "toto", "admin@bonita.org");
28: lBean.initializeUser("admin2", "toto2", "admin@bonita.org");
29: lBean.initializeUser("nobody", "nobody", "admin@bonita.org");
30: lBean.initializeAuthRole("BONITAUSER", "BONITAUSER");
31: lBean.initializeAuthRole("nobody", "nobody");
32: lBean.initialize("admin", "BONITAUSER");
33: lBean.initialize("admin", "nobody");
34: lBean.initialize("admin2", "BONITAUSER");
35: lBean.initialize("admin2", "nobody");
36: lBean.initialize("nobody", "nobody");
37: }
38:
39: }
|