2016-12-20 09:46:40 +00:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
using Xunit;
|
|
|
|
using System.Linq;
|
|
|
|
using LibMpc;
|
|
|
|
|
|
|
|
namespace LibMpcTest
|
|
|
|
{
|
|
|
|
public partial class LibMpcTest
|
|
|
|
{
|
|
|
|
[Fact]
|
|
|
|
public async Task ListAllTest()
|
|
|
|
{
|
|
|
|
var response = await Mpc.SendAsync(new Commands.Database.ListAll());
|
|
|
|
|
2016-12-20 10:03:28 +00:00
|
|
|
TestOutput.WriteLine("ListAllTest Result:");
|
|
|
|
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
2016-12-20 09:46:40 +00:00
|
|
|
|
|
|
|
Assert.True(response.Response.Body.Count().Equals(7));
|
|
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public async Task FindGenreTest()
|
|
|
|
{
|
|
|
|
var response = await Mpc.SendAsync(new Commands.Database.Find(MpdTags.Genre, "soundfx"));
|
|
|
|
|
2016-12-20 10:03:28 +00:00
|
|
|
TestOutput.WriteLine("FindGenreTest Result:");
|
|
|
|
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
2016-12-20 09:46:40 +00:00
|
|
|
|
2016-12-20 14:42:48 +00:00
|
|
|
Assert.True(response.Response.Body.Count().Equals(7));
|
2016-12-20 09:46:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|