public async void GetNewRuleAsyncTest()
        {
            var deviceId = fixture.Create <string>();
            var rule     = await deviceRulesLogic.GetNewRuleAsync(deviceId);

            Assert.NotNull(rule);
            Assert.Equal(deviceId, rule.DeviceID);
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> GetNewRule(string deviceId)
        {
            DeviceRule rule = await _deviceRulesLogic.GetNewRuleAsync(deviceId);

            return(Json(rule));
        }
Ejemplo n.º 3
0
 public async Task <HttpResponseMessage> GetNewRuleAsync(string deviceId)
 {
     return(await GetServiceResponseAsync(async() => await _deviceRulesLogic.GetNewRuleAsync(deviceId)));
 }