2016-12-20 09:46:40 +00:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Xunit;
|
|
|
|
using LibMpc;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
namespace LibMpcTest
|
|
|
|
{
|
|
|
|
public partial class LibMpcTest
|
|
|
|
{
|
2016-12-20 10:19:26 +00:00
|
|
|
[Fact]
|
|
|
|
public async Task CommandsTest()
|
|
|
|
{
|
|
|
|
var response = await Mpc.SendAsync(new Commands.Reflection.Commands());
|
|
|
|
|
|
|
|
TestOutput.WriteLine($"CommandsTest (commands: {response.Response.Body.Count()}) Result:");
|
|
|
|
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
|
|
|
|
2016-12-20 10:26:42 +00:00
|
|
|
// Different answer from MPD on Windows and on Linux, beacuse of Version.
|
|
|
|
// Check only if response is not empty
|
|
|
|
Assert.True(response.Response.Body.Any());
|
2016-12-20 10:19:26 +00:00
|
|
|
}
|
|
|
|
|
2016-12-20 09:46:40 +00:00
|
|
|
[Fact]
|
|
|
|
public async Task TagTypesTest()
|
|
|
|
{
|
|
|
|
var response = await Mpc.SendAsync(new Commands.Reflection.TagTypes());
|
|
|
|
|
2016-12-20 10:03:28 +00:00
|
|
|
TestOutput.WriteLine("TagTypesTest Result:");
|
|
|
|
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
2016-12-20 09:46:40 +00:00
|
|
|
|
|
|
|
Assert.True(response.Response.Body.Count().Equals(17));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|