feat: add inital in memory dispatcher
All checks were successful
default / dotnet-default-workflow (push) Successful in 1m29s
All checks were successful
default / dotnet-default-workflow (push) Successful in 1m29s
Add a simple in memory dispatcher for scalar requests and stream request.
This commit is contained in:
commit
af610beb8f
145 changed files with 6384 additions and 0 deletions
27
src/request.result.tests/ErrorTests.cs
Normal file
27
src/request.result.tests/ErrorTests.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
namespace Geekeey.Request.Result.Tests;
|
||||
|
||||
internal sealed class ErrorTests
|
||||
{
|
||||
[Test]
|
||||
public async Task I_can_implicitly_convert_from_string_and_get_string_error()
|
||||
{
|
||||
Error error = "error";
|
||||
|
||||
using var scope = Assert.Multiple();
|
||||
await Assert.That(error).IsTypeOf<StringError>();
|
||||
await Assert.That(error.Message).IsEqualTo("error");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task I_can_implicitly_convert_from_exception_and_get_exception_error()
|
||||
{
|
||||
Error error = new CustomTestException();
|
||||
|
||||
using var scope = Assert.Multiple();
|
||||
var instance = await Assert.That(error).IsTypeOf<ExceptionError>();
|
||||
await Assert.That(instance?.Exception).IsTypeOf<CustomTestException>();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue