当前位置: 首页>>代码示例>>Java>>正文


Java NewUser.setLastName方法代码示例

本文整理汇总了Java中org.ndexbio.model.object.NewUser.setLastName方法的典型用法代码示例。如果您正苦于以下问题:Java NewUser.setLastName方法的具体用法?Java NewUser.setLastName怎么用?Java NewUser.setLastName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ndexbio.model.object.NewUser的用法示例。


在下文中一共展示了NewUser.setLastName方法的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;
		
	}
}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:24,代码来源:TestUserDAO.java

示例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();
}

}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:36,代码来源:TestGroupDAO.java

示例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);
           
}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:14,代码来源:TestUserDAO.java

示例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);
           
}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:14,代码来源:TestUserDAO.java

示例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);
           
}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:14,代码来源:TestUserDAO.java

示例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);
		
}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:14,代码来源:TestUserDAO.java

示例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());
		
	}
}
 
开发者ID:ndexbio,项目名称:ndex-common,代码行数:23,代码来源:TestGroupDAO.java


注:本文中的org.ndexbio.model.object.NewUser.setLastName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。