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