public void Deserialize_ValidData_ReturnsCorrectlyPopulatedObject() { var responseString = @"{""matrix"":[3,2,1,0,3,2,1,0],""status"":""success"",""audioInfo"":{""audiosel"":""local"",""mute"":true,""volume"":50,""tune mode"":""presets"",""presets"":""flat"",""band0"":5,""band1"":6,""band2"":7,""band3"":8,""band4"":9,""basstone"":10,""treble"":11,""surround"":true,""surrlevel"":1,""basslevel"":31,""bass"":true,""bassfreq"":100,""highpass"":true}}"; TestHttpClient.ResponseContents = responseString; api.Poll(); using (new AssertionScope()) { api.Volume.Should().Be(32767); api.Mute.Should().Be(1); api.TuneMode.Should().Be("presets"); api.Preset.Should().Be("flat"); api.Band115.Value.Should().Be(50); api.Band330.Value.Should().Be(60); api.Band990.Value.Should().Be(70); api.Band3000.Value.Should().Be(80); api.Band9900.Value.Should().Be(90); api.Bass.Value.Should().Be(100); api.Treble.Value.Should().Be(110); api.Surround.Should().Be(1); api.SurroundLevel.Should().Be(9362); api.BassEnhancement.Should().Be(1); api.BassCutoff.Should().Be(100); api.BassLevel.Should().Be(15996); api.HighPass.Should().Be(1); } }
public void Poll() { ActiveSource.Poll(); AudioSettings.Poll(); }