public void should_parse_short_SMSC() { _redisServiceMock.Setup(m => m.GetValueFromHash<SMSCInfo>("SMSC", "123")).Returns(new SMSCInfo { ProvinceId = 0 }); CommonService commonService = new CommonService(redisService); Assert.Equal(0, commonService.GetProvinceIdBySMSC("123")); }
public void should_parse_normal_SMSC_without_prefix() { _redisServiceMock.Setup(m => m.GetValueFromHash<SMSCInfo>("SMSC", "1380037")).Returns(new SMSCInfo { ProvinceId = 26 }); CommonService commonService = new CommonService(redisService); Assert.Equal(26, commonService.GetProvinceIdBySMSC("1380037")); }