From 9b163f32a8d5fa4abe5ea4188ab99d1271ce5ff8 Mon Sep 17 00:00:00 2001 From: glucaci Date: Tue, 20 Dec 2016 12:20:16 +0100 Subject: [PATCH] Asserts for DecodersTest --- LibMpcTest/Tests/ReflectionCommandsTest.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/LibMpcTest/Tests/ReflectionCommandsTest.cs b/LibMpcTest/Tests/ReflectionCommandsTest.cs index 91f7879..a4e2a48 100644 --- a/LibMpcTest/Tests/ReflectionCommandsTest.cs +++ b/LibMpcTest/Tests/ReflectionCommandsTest.cs @@ -61,7 +61,20 @@ namespace LibMpcTest TestOutput.WriteLine($"DecodersTest (decoders: {response.Response.Body.Count()}) Result:"); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); - // TODO: Assert + // Different answer from MPD on Windows and on Linux. + // Check some of the decoders. + Assert.True(response.Response.Body.Any(decoder => decoder.Name.Equals("mad"))); + Assert.True(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mp3")))); + Assert.True(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg")))); + Assert.True(response.Response.Body.Any(decoder => decoder.Name.Equals("flac"))); + Assert.True(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("flac")))); + Assert.True(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/flac")))); + Assert.True(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/x-flac")))); + Assert.True(response.Response.Body.Any(decoder => decoder.Name.Equals("ffmpeg"))); + Assert.True(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("aac")))); + Assert.True(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mpeg")))); + Assert.True(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/aac")))); + Assert.True(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg")))); } } } \ No newline at end of file