search test
This commit is contained in:
parent
563b4e0441
commit
723eb19090
1 changed files with 22 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
using Nyanbyte.PPCheck.Lib;
|
using Nyanbyte.PPCheck.Lib;
|
||||||
|
using Nyanbyte.PPCheck.Lib.Models;
|
||||||
|
|
||||||
namespace Nyanbyte.PPCheck.Tests;
|
namespace Nyanbyte.PPCheck.Tests;
|
||||||
|
|
||||||
|
@ -10,8 +11,28 @@ public class Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void Meow()
|
public async Task Meow()
|
||||||
{
|
{
|
||||||
ApiClient cli = new();
|
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"));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue