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