feat: initial project commit
All checks were successful
default / default (8.0) (push) Successful in 1m7s

This commit is contained in:
Louis Seubert 2024-04-14 17:42:13 +02:00
commit 30ef7bd477
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
40 changed files with 3752 additions and 0 deletions

View file

@ -0,0 +1,30 @@
namespace Geekeey.Extensions.Result.Tests;
[TestFixture]
internal sealed class ErrorTests
{
[Test]
public void ImplicitConversion_FromString_ReturnsStringError()
{
Error error = "error";
Assert.Multiple(() =>
{
Assert.That(error, Is.InstanceOf<StringError>());
Assert.That(error.Message, Is.EqualTo("error"));
});
}
[Test]
public void ImplicitConversion_FromException_ReturnsExceptionError()
{
Error error = new CustomTestException();
Assert.Multiple(() =>
{
Assert.That(error, Is.InstanceOf<ExceptionError>());
var instance = error as ExceptionError;
Assert.That(instance?.Exception, Is.InstanceOf<CustomTestException>());
});
}
}