search test

This commit is contained in:
femsci 2024-02-22 15:22:35 +01:00
parent 563b4e0441
commit 723eb19090
Signed by: femsci
GPG key ID: 21AC2CC03E5BBCD6

View file

@ -1,4 +1,5 @@
using Nyanbyte.PPCheck.Lib;
using Nyanbyte.PPCheck.Lib.Models;
namespace Nyanbyte.PPCheck.Tests;
@ -10,8 +11,28 @@ public class Tests
}
[Test]
public void Meow()
public async Task Meow()
{
ApiClient cli = new();
SearchRequest req = new()
{
FirstName = "dariusz",
LastName = "adamski"
};
var results = await cli.Search(req);
Assert.Multiple(() =>
{
Assert.That(results.HasError, Is.False);
Assert.That(results.Total, Is.GreaterThan(0));
});
var person = results.Data[0].Personas[0];
Assert.Multiple(() =>
{
Assert.That(person.FirstName, Is.EqualTo("DARIUSZ"));
Assert.That(person.LastName, Is.EqualTo("ADAMSKI"));
});
}
}