public void SetArmingWaitTime_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.SetArmingWaitTime(20); // Assert miioDevice.Verify(x => x.SendMessage("{\"id\": 1, \"method\": \"set_arm_wait_time\", \"params\": [20]}"), Times.Once()); }