mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-07-02 09:07:38 +00:00
Use only one Client and one Server for all Tests. Output tests.
This commit is contained in:
33
LibMpcTest/Tests/DatabaseCommandsTest.cs
Normal file
33
LibMpcTest/Tests/DatabaseCommandsTest.cs
Normal file
@ -0,0 +1,33 @@
|
||||
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());
|
||||
|
||||
TestUtils.WriteLine("ListAllTest Result:");
|
||||
TestUtils.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
||||
|
||||
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"));
|
||||
|
||||
TestUtils.WriteLine("FindGenreTest Result:");
|
||||
TestUtils.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
|
||||
|
||||
Assert.True(response.Response.Body.Count().Equals(6));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user