public void SetArmingOffTime_Should_Not_Throw_Exceptions() { // Arrange var miioDevice = new Mock <IMiioTransport>(); miioDevice.Setup(x => x.SendMessage(It.IsAny <string>())).Returns("{\"result\":[\"ok\"],\"id\":1}"); var miioGateway = new MiioGateway(miioDevice.Object); // Act miioGateway.SetArmingOffTime(40); // Assert miioDevice.Verify(x => x.SendMessage("{\"id\": 1, \"method\": \"set_device_prop\", \"params\": {\"sid\":\"lumi.0\", \"alarm_time_len\":40}}"), Times.Once()); }