public async Task GetArmingBlinkingTimeAsync_Returns_IntegerAsync() { // Arrange var miioDevice = new Mock <IMiioTransport>(); miioDevice.Setup(x => x.SendMessageAsync(It.IsAny <string>())).Returns(Task.FromResult("{\"result\":[30],\"id\":1}")); var miioGateway = new MiioGateway(miioDevice.Object); // Act var armingBlinkingTime = await miioGateway.GetArmingBlinkingTimeAsync(); // Assert miioDevice.Verify(x => x.SendMessageAsync("{\"id\": 1, \"method\": \"get_device_prop\", \"params\": [\"lumi.0\",\"en_alarm_light\"]}"), Times.Once()); Assert.Equal(30, armingBlinkingTime); }