本文整理汇总了Java中org.oscm.test.ejb.TestDataSources类的典型用法代码示例。如果您正苦于以下问题:Java TestDataSources类的具体用法?Java TestDataSources怎么用?Java TestDataSources使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TestDataSources类属于org.oscm.test.ejb包,在下文中一共展示了TestDataSources类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpBeforeClass
import org.oscm.test.ejb.TestDataSources; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
TESTDB = TestDataSources.get("oscm-domainobjects");
TESTDB.initialize();
String[] ins = {
"INSERT INTO Organization (TKEY, VERSION, REGISTRATIONDATE, ORGANIZATIONID, REMOTELDAPACTIVE, CUTOFFDAY) VALUES (10, 0, 0, 'oid1', true, 1)",
"INSERT INTO Organization (TKEY, VERSION, REGISTRATIONDATE, ORGANIZATIONID, CUTOFFDAY) VALUES (20, 0, 0, 'oid2', 1)",
"INSERT INTO Organization (TKEY, VERSION, REGISTRATIONDATE, ORGANIZATIONID, CUTOFFDAY) VALUES (30, 0, 0, 'oid3', 1)",
"INSERT INTO PlatformUser (TKEY, VERSION, ORGANIZATIONKEY, FAILEDLOGINCOUNTER, CREATIONDATE, STATUS, USERID, LOCALE, REALMUSERID) VALUES (10, 0, 10, 0, 0, 'ACTIVE', 'uid1', 'en', 'uid1')",
"INSERT INTO PlatformUser (TKEY, VERSION, ORGANIZATIONKEY, FAILEDLOGINCOUNTER, CREATIONDATE, STATUS, USERID, LOCALE, REALMUSERID) VALUES (20, 0, 10, 0, 0, 'ACTIVE', 'uid2', 'en', 'ldapuid2')",
"INSERT INTO PlatformUser (TKEY, VERSION, ORGANIZATIONKEY, FAILEDLOGINCOUNTER, CREATIONDATE, STATUS, USERID, LOCALE, PASSWORDSALT, PASSWORDHASH) VALUES (30, 0, 20, 0, 0, 'ACTIVE', 'uid3', 'en', 0, decode('"
+ PASSWORD_HASH + "', 'hex'))",
"INSERT INTO PlatformUser (TKEY, VERSION, ORGANIZATIONKEY, FAILEDLOGINCOUNTER, CREATIONDATE, STATUS, USERID, LOCALE, PASSWORDSALT, PASSWORDHASH) VALUES (40, 0, 30, 0, 0, 'ACTIVE', 'uid4', 'en', 0, decode('"
+ PASSWORD_HASH + "', 'hex'))",
"INSERT INTO UserRole (TKEY, ROLENAME, VERSION) VALUES (1, 'ORGANIZATION_ADMIN', 0)",
"INSERT INTO UserRole (TKEY, ROLENAME, VERSION) VALUES (2, 'SERVICE_MANAGER', 0)",
"INSERT INTO RoleAssignment (TKEY, VERSION, USER_TKEY,USERROLE_TKEY) VALUES (1, 0, 20, 1)",
"INSERT INTO RoleAssignment (TKEY, VERSION, USER_TKEY,USERROLE_TKEY) VALUES (2, 0, 20, 2)",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (10, 0, 10, '"
+ SettingType.LDAP_BASE_DN
+ "', '"
+ CFG_LDAP_BASE_DN
+ "')",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (11, 0, 10, '"
+ SettingType.LDAP_ATTR_UID
+ "', '"
+ LDAP_ATTR_UID
+ "')",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (12, 0, 10, '"
+ SettingType.LDAP_URL
+ "', '"
+ LDAP_REMOTE_URL
+ "')",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (13, 0, 10, '"
+ SettingType.LDAP_CONTEXT_FACTORY
+ "', '"
+ CFG_LDAP_CONTEXT_FACTORY + "')",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (14, 0, 10, '"
+ SettingType.LDAP_CREDENTIALS + "', 'secret')",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (15, 0, 10, '"
+ SettingType.LDAP_PRINCIPAL
+ "', 'uid=admin,ou=system')",
"INSERT INTO OrganizationSetting (TKEY, VERSION, ORGANIZATION_TKEY, SETTINGTYPE, SETTINGVALUE) VALUES (16, 0, 10, '"
+ SettingType.LDAP_ATTR_REFERRAL + "', 'ignore')", };
for (String stmt : ins) {
execSQL(stmt);
}
System.setProperty("bss.nodename", CFG_LOCAL);
}