?????????????????????
???????????? ???????[ 2013/1/21 11:15:31 ] ????????
???????磬??????????user?????????Χ????????????д??
public BaseUserDO getExpectUser(String nick){
//??????Χ???nick???飬?????????????????????????????????null
String[] exsitUserNicks= {Nick.b2bNick.value?? Nick.subB2BNick.value};
if(ArrayUtil.contains(exsitUserNicks?? nick)){
//????nick?????????????
ResultDO<BaseUserDO> callback = uicReadServiceClient.getUserInfoByNick(nick);
Assert.assertTrue(callback.getErrMsg()?? callback.isSuccess());
Assert.assertNotNull(callback.getModule());
return callback.getModule();
}
return null;
}
??????????“Nick.b2bNick.value”??Nick???????????????????????????
public enum Nick{
blankNick("")??
nullNick(null)??
notExsitNick("1233211")??
tbNick("leizang_test")??
b2bNick("leizang_btob_1")??
subB2BNick("leizang_btob_1:subnick01");
String value;
Nick(String value){
this.value= value;
}
}
???????????????????д???·?????
?м???? |
?????????? |
??д???????????????? |
user |
nick |
getExpectUser(nick) |
ruleCode |
user?? wwLimitData |
getExpectRuleCode(user?? wwLimitData) |
isFrozen |
user?? wwLimitData |
getExpectIsFrozen(user?? wwLimitData) |
suspended |
user?? isFrozen |
getExpectSuspended(user?? isFrozen) |
punishData |
user?? punishData?? suspended |
getExpectPunishData(user?? punishData?? suspended) |
mmpData |
user?? mmpData |
getExpectMmpData(user?? mmpData) |
??????????????????????????????????????????????????????resultMap??????????????
public void verify(String nick?? String wwLimitData??
String punishData?? String mmpData?? Map<String?? String> resultMap){
BaseUserDO expectUser= getExpectUser(nick);
String expectRuleCode= getExpectRuleCode(expectUser?? wwLimitData);
boolean expectIsFrozen= getExpectIsFrozen(expectUser?? wwLimitData);
String expectSuspended= getExpectSuspended(expectUser?? expectIsFrozen);
String expectPunishData= getExpectPunishData(expectUser?? punishData?? expectSuspended);
String expectMmpData= getExpectMmpData(expectUser?? mmpData);
Assert.assertEquals("user"?? expectUser?? resultMap.get("user"));
Assert.assertEquals("ruleCode"?? expectRuleCode?? resultMap.get("ruleCode"));
Assert.assertEquals("suspended"?? expectSuspended?? resultMap.get("suspended"));
Assert.assertEquals("punishData"?? expectPunishData?? resultMap.get("punishData"));
Assert.assertEquals("mmpData"?? expectMmpData?? resultMap.get("mmpData"));
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11