???????磬??????????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"));

         }