mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-01-14 22:18:43 +00:00
UrlHandlersTest fixed
This commit is contained in:
parent
ef57b0a76b
commit
ed2604f81b
@ -17,8 +17,13 @@ namespace LibMpcTest
|
|||||||
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
||||||
|
|
||||||
// Different answer from MPD on Windows and on Linux, beacuse of Version.
|
// Different answer from MPD on Windows and on Linux, beacuse of Version.
|
||||||
// Check only if response is not empty
|
// Check some of the commands.
|
||||||
Assert.True(response.Response.Body.Any());
|
Assert.True(response.Response.Body.Any(command => command.Equals("listall")));
|
||||||
|
Assert.True(response.Response.Body.Any(command => command.Equals("outputs")));
|
||||||
|
Assert.True(response.Response.Body.Any(command => command.Equals("pause")));
|
||||||
|
Assert.True(response.Response.Body.Any(command => command.Equals("play")));
|
||||||
|
Assert.True(response.Response.Body.Any(command => command.Equals("setvol")));
|
||||||
|
Assert.True(response.Response.Body.Any(command => command.Equals("stop")));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@ -40,7 +45,12 @@ namespace LibMpcTest
|
|||||||
TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Body.Count()}) Result:");
|
TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Body.Count()}) Result:");
|
||||||
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
||||||
|
|
||||||
Assert.True(response.Response.Body.Count().Equals(11));
|
// Different answer from MPD on Windows and on Linux.
|
||||||
|
// Check some of the handlers.
|
||||||
|
Assert.True(response.Response.Body.Any(handler => handler.Equals("http://")));
|
||||||
|
Assert.True(response.Response.Body.Any(handler => handler.Equals("mms://")));
|
||||||
|
Assert.True(response.Response.Body.Any(handler => handler.Equals("gopher://")));
|
||||||
|
Assert.True(response.Response.Body.Any(handler => handler.Equals("rtp://")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user