From 723eb19090527c1e1f4bb957f863b957bed76cfb Mon Sep 17 00:00:00 2001 From: femsci Date: Thu, 22 Feb 2024 15:22:35 +0100 Subject: [PATCH] search test --- test/Nyanbyte.PPCheck.Tests/ApiTest.cs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/Nyanbyte.PPCheck.Tests/ApiTest.cs b/test/Nyanbyte.PPCheck.Tests/ApiTest.cs index 08316a9..61718f6 100644 --- a/test/Nyanbyte.PPCheck.Tests/ApiTest.cs +++ b/test/Nyanbyte.PPCheck.Tests/ApiTest.cs @@ -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")); + }); } }