本文整理汇总了Java中org.ndexbio.model.object.NewUser.setAccountName方法的典型用法代码示例。如果您正苦于以下问题:Java NewUser.setAccountName方法的具体用法?Java NewUser.setAccountName怎么用?Java NewUser.setAccountName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.ndexbio.model.object.NewUser
的用法示例。
在下文中一共展示了NewUser.setAccountName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTestUser
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
private boolean createTestUser() {
try {
//localConnection.begin();
final NewUser newUser = new NewUser();
newUser.setEmailAddress("testUser");
newUser.setPassword("testUser");
newUser.setAccountName("testUser");
newUser.setFirstName("testUser");
newUser.setLastName("testUser");
testUser = dao.createNewUser(newUser,null);
//localConnection.commit();
return true;
} catch (Throwable e) {
return false;
}
}
示例2: updateMembershipAddMember
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
@Test
public void updateMembershipAddMember() throws ObjectNotFoundException, NdexException {
User member = null;
try {
//localConnection.begin();
final NewUser newUser = new NewUser();
newUser.setEmailAddress("member");
newUser.setPassword("member");
newUser.setAccountName("member");
newUser.setFirstName("member");
newUser.setLastName("member");
member = userDAO.createNewUser(newUser,null);
//localConnection.commit();
Membership membership = new Membership();
membership.setMemberAccountName(member.getAccountName());
membership.setMemberUUID(member.getExternalId());
membership.setPermissions(Permissions.WRITE);
membership.setMembershipType(MembershipType.GROUP);
dao.updateMember(membership, testGroup.getExternalId(), testUser.getExternalId());
//localConnection.commit();
} catch(Exception e) {
fail(e.getMessage());
} finally {
userDAO.deleteUserById(member.getExternalId());
//localConnection.commit();
}
}
示例3: createUserInvalidAccountName
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void createUserInvalidAccountName() throws NdexException, IllegalArgumentException {
final NewUser newUser = new NewUser();
newUser.setEmailAddress("test");
newUser.setPassword("test");
newUser.setAccountName("");
newUser.setFirstName("test");
newUser.setLastName("test");
dao.createNewUser(newUser,null);
}
示例4: createUserInvalidPassword
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void createUserInvalidPassword() throws NdexException, IllegalArgumentException {
final NewUser newUser = new NewUser();
newUser.setEmailAddress("test");
newUser.setPassword("");
newUser.setAccountName("test");
newUser.setFirstName("test");
newUser.setLastName("test");
dao.createNewUser(newUser,null);
}
示例5: createUserInvalidEmail
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
@Test(expected = IllegalArgumentException.class)
public void createUserInvalidEmail() throws NdexException, IllegalArgumentException {
final NewUser newUser = new NewUser();
newUser.setEmailAddress("");
newUser.setPassword("test");
newUser.setAccountName("test");
newUser.setFirstName("test");
newUser.setLastName("test");
dao.createNewUser(newUser,null);
}
示例6: createUserExistingUser
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
@Test(expected = DuplicateObjectException.class)
public void createUserExistingUser() throws IllegalArgumentException, NdexException, DuplicateObjectException {
final NewUser newUser = new NewUser();
newUser.setEmailAddress("test");
newUser.setPassword("test");
newUser.setAccountName("test");
newUser.setFirstName("test");
newUser.setLastName("test");
dao.createNewUser(newUser,null);
}
示例7: createTestUser
import org.ndexbio.model.object.NewUser; //导入方法依赖的package包/类
private void createTestUser() {
try {
final NewUser newUser = new NewUser();
newUser.setEmailAddress("testUser");
newUser.setPassword("testUser");
newUser.setAccountName("testUser");
newUser.setFirstName("testUser");
newUser.setLastName("testUser");
testUser = userDAO.createNewUser(newUser,null);
//localConnection.commit();
//return true;
} catch (Throwable e) {
fail(e.getMessage());
}
}