本文整理汇总了Java中org.oscm.vo.VOUser.setKey方法的典型用法代码示例。如果您正苦于以下问题:Java VOUser.setKey方法的具体用法?Java VOUser.setKey怎么用?Java VOUser.setKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscm.vo.VOUser
的用法示例。
在下文中一共展示了VOUser.setKey方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRevokeUserGroupAssignment_DefaultGroup
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@Test(expected = OperationNotPermittedException.class)
public void addRevokeUserGroupAssignment_DefaultGroup() throws Exception {
List<VOUser> usersToBeAdded = new ArrayList<VOUser>();
VOUser user = new VOUser();
user.setKey(111L);
usersToBeAdded.add(user);
List<VOUser> usersToBeRevoked = new ArrayList<VOUser>();
String groupName = "default";
try {
is.addRevokeUserGroupAssignment(groupName, usersToBeAdded,
usersToBeRevoked);
} catch (OperationNotPermittedException e) {
validateException(e);
throw e;
}
}
示例2: addRevokeUserUnitAssignment_DefaultUnit
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Test(expected = OperationNotPermittedException.class)
public void addRevokeUserUnitAssignment_DefaultUnit() throws Exception {
List<VOUser> usersToBeAdded = new ArrayList<VOUser>();
VOUser user = new VOUser();
user.setKey(111L);
usersToBeAdded.add(user);
List<VOUser> usersToBeRevoked = new ArrayList<VOUser>();
String unitName = "default";
try {
is.addRevokeUserUnitAssignment(unitName, usersToBeAdded,
usersToBeRevoked);
} catch (OperationNotPermittedException e) {
validateException(e);
throw e;
}
}
示例3: toDomUserConvert
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Test
public void toDomUserConvert() {
// given
VOUser user = new VOUser();
user.setKey(VALID_KEY);
user.setUserId(VALID_ID);
// when
PlatformUser pUser = Converter.convert(user, VOUser.class,
PlatformUser.class);
Assert.assertEquals(user.getKey(), pUser.getKey());
Assert.assertEquals(user.getUserId(), pUser.getUserId());
}
示例4: convert
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
@Override
public VOUser convert(PlatformUser platformUser) {
if (platformUser == null) {
return null;
}
VOUser user = new VOUser();
// Base user data
user.setKey(platformUser.getKey());
user.setVersion(platformUser.getVersion());
user.setUserId(platformUser.getUserId());
return user;
}
示例5: addReturnException
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
/**
* if the CTMG add exception in return value in an api upgrade:
*
* add exception ObjectNotFoundException in
* IdentityService.lockUserAccount()
*/
@Test
public void addReturnException() {
try {
// when
VOUser user = new VOUser();
user.setKey(15667733456547558L);
lockUser(user);
} catch (SOAPFaultException e) {
// then
Assert.assertTrue(e.getMessage().contains(
"Could not find object of type 'USER' with business key"));
}
}
示例6: createVOUserWithKey
import org.oscm.vo.VOUser; //导入方法依赖的package包/类
public static VOUser createVOUserWithKey(long userKey) {
VOUser user = new VOUser();
user.setKey(userKey);
return user;
}