pp-check/test/Nyanbyte.PPCheck.Tests/ApiTest.cs

39 lines
822 B
C#
Raw Normal View History

2024-02-22 15:15:44 +01:00
using Nyanbyte.PPCheck.Lib;
2024-02-22 15:22:35 +01:00
using Nyanbyte.PPCheck.Lib.Models;
2024-02-22 15:15:44 +01:00
namespace Nyanbyte.PPCheck.Tests;
public class Tests
{
[SetUp]
public void Setup()
{
}
[Test]
2024-02-22 15:22:35 +01:00
public async Task Meow()
2024-02-22 15:15:44 +01:00
{
ApiClient cli = new();
2024-02-22 15:22:35 +01:00
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"));
});
2024-02-22 15:15:44 +01:00
}
}