1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2024-09-16 05:30:09 +00:00
MpcNET/LibMpcTest/Tests/DatabaseCommandsTest.cs

33 lines
1.0 KiB
C#

using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Linq;
using LibMpc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace LibMpcTest
{
public partial class LibMpcTest
{
[TestMethod]
public async Task ListAllTest()
{
var response = await Mpc.SendAsync(new Commands.Database.ListAll());
TestOutput.WriteLine("ListAllTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
Assert.IsTrue(response.Response.Body.Count().Equals(7));
}
[TestMethod]
public async Task FindGenreTest()
{
var response = await Mpc.SendAsync(new Commands.Database.Find(MpdTags.Genre, "soundfx"));
TestOutput.WriteLine("FindGenreTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
Assert.IsTrue(response.Response.Body.Count().Equals(7));
}
}
}