├── tests
├── Reprise.Benchmarks.Api
│ ├── Global.cs
│ ├── appsettings.json
│ ├── Reprise.Benchmarks.Api.csproj
│ ├── Properties
│ │ └── launchSettings.json
│ └── Program.cs
├── Reprise.UnitTests
│ ├── Features
│ │ ├── Endpoints
│ │ │ ├── EndpointTypeProcessorTests.Process.verified.txt
│ │ │ ├── EndpointMapperTests.Add.verified.txt
│ │ │ ├── EndpointMapperTests.MapEndpoints_EmptyRoute.verified.txt
│ │ │ ├── EndpointMapperTests.MapEndpoints_EmptyHttpMethod.verified.txt
│ │ │ ├── EndpointMapperTests.MapEndpoints_NoHandleMethod.verified.txt
│ │ │ ├── EndpointMapperTests.MapEndpoints_MultipleHandleMethods.verified.txt
│ │ │ ├── EndpointMapperTests.MapEndpoints_NoMethodRouteAttribute.verified.txt
│ │ │ ├── EndpointMapperTests.MapEndpoints_DuplicateRoute.verified.txt
│ │ │ └── EndpointMapperTests.MapEndpoints_MultipleMethodRouteAttributes.verified.txt
│ │ ├── ExceptionHandling
│ │ │ ├── DefaultExceptionLoggerTests.Log_ValidationException.verified.txt
│ │ │ ├── ErrorContextTests.Request.verified.txt
│ │ │ ├── ErrorContextTests.TraceIdentifier.verified.txt
│ │ │ ├── ExceptionHandlerTests.InvokeAsync.verified.txt
│ │ │ ├── DefaultExceptionLoggerTests.Log_Exception.verified.txt
│ │ │ ├── ExceptionLoggerTypeProcessorTests.Process_DuplicateExceptionLogger.verified.txt
│ │ │ ├── ErrorResponseFactoryTypeProcessorTests.Process_DuplicateErrorResponseFactory.verified.txt
│ │ │ ├── DefaultExceptionLoggerTests.Log_BadHttpRequestException.verified.txt
│ │ │ ├── ExceptionHandlerTests.Ctor_NoExceptionLogger.verified.txt
│ │ │ ├── ExceptionHandlerTests.Ctor_NoErrorResponseFactory.verified.txt
│ │ │ ├── ExceptionHandlerTests.InvokeAsync_Exception.verified.txt
│ │ │ ├── ExceptionHandlerTests.InvokeAsync_ValidationException.verified.txt
│ │ │ └── DefaultErrorResponseFactoryTests.cs
│ │ ├── OpenApi
│ │ │ ├── Name
│ │ │ │ ├── NameProcessorTests.Process_EmptyName.verified.txt
│ │ │ │ ├── NameProcessorTests.Process_Duplicate.verified.txt
│ │ │ │ ├── NameProcessorTests.Process_NoAttribute.DotNet6_0.verified.txt
│ │ │ │ ├── NameProcessorTests.Process.DotNet6_0.verified.txt
│ │ │ │ ├── NameProcessorTests.Process_NoAttribute.DotNet7_0.verified.txt
│ │ │ │ └── NameProcessorTests.Process.DotNet7_0.verified.txt
│ │ │ ├── Tags
│ │ │ │ ├── TagsProcessorTests.Process_EmptyTag.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route= .DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-{id}.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route={id}.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api-{id}.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-users.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api-users.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-users-{id}.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-{id}-users.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api-users-{id}.DotNet6_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route= .DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-{id}.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route={id}.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api-{id}.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-users.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-api-users.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-users-{id}.DotNet7_0.verified.txt
│ │ │ │ ├── TagsProcessorTests.Process_NoAttribute_route=-{id}-users.DotNet7_0.verified.txt
│ │ │ │ └── TagsProcessorTests.Process_NoAttribute_route=-api-users-{id}.DotNet7_0.verified.txt
│ │ │ ├── Produces
│ │ │ │ ├── ProducesProcessorTests.Process_NoAttribute.DotNet6_0.verified.txt
│ │ │ │ ├── ProducesProcessorTests.Process_NoAttribute.DotNet7_0.verified.txt
│ │ │ │ └── ProducesProcessorTests.Process.DotNet6_0.verified.txt
│ │ │ └── ExcludeFromDescription
│ │ │ │ ├── ExcludeFromDescriptionProcessorTests.Process_NoAttribute.DotNet6_0.verified.txt
│ │ │ │ ├── ExcludeFromDescriptionProcessorTests.Process.DotNet6_0.verified.txt
│ │ │ │ ├── ExcludeFromDescriptionProcessorTests.Process_NoAttribute.DotNet7_0.verified.txt
│ │ │ │ └── ExcludeFromDescriptionProcessorTests.Process.DotNet7_0.verified.txt
│ │ ├── Events
│ │ │ └── EventBusTests
│ │ │ │ ├── Publish.PayloadNull.verified.txt
│ │ │ │ ├── PublishAndWait.PayloadNull.verified.txt
│ │ │ │ ├── Publish.MultipleHandlers.verified.txt
│ │ │ │ └── PublishAndWait.MultipleHandlers.verified.txt
│ │ ├── Filters
│ │ │ ├── EndpointFilterTests.EndpointFilter_NoImplementation.verified.txt
│ │ │ ├── ValidationFilterTests.NullableTypeNull.verified.txt
│ │ │ ├── EndpointFilterTests.EndpointFilter.verified.txt
│ │ │ ├── EndpointFilterTests.GlobalEndpointFilters.verified.txt
│ │ │ ├── EndpointFilterTests.GlobalEndpointFilters_EndpointFilter.verified.txt
│ │ │ ├── EndpointFilterTests.GlobalEndpointFilters_EndpointMultipleFilters.verified.txt
│ │ │ ├── ValidationFilterTests.NoValidator.verified.txt
│ │ │ ├── ValidationFilterTests.NullableType.verified.txt
│ │ │ ├── ValidationFilterTests.ValidRequest.verified.txt
│ │ │ ├── ValidationFilterTests.MultipleTypes.verified.txt
│ │ │ ├── ValidationFilterTests.InvalidRequest.verified.txt
│ │ │ ├── ValidationFilterTests.NullableTypeInvalidRequest.verified.txt
│ │ │ └── ValidationFilterTests.MultipleTypesInvalidRequest.verified.txt
│ │ ├── Configurations
│ │ │ ├── ConfigurationTypeProcessorTests.Process_EmptySubSectionKey.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_InvalidSubSectionKey.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_DuplicateConfiguration.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_MissingProperty.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_ComplexMissingProperty.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_NoParameterlessCtor.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_InvalidValue.DotNet6_0.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_ComplexInvalidValue.DotNet6_0.verified.txt
│ │ │ ├── ConfigurationTypeProcessorTests.Process_InvalidValue.DotNet7_0.verified.txt
│ │ │ └── ConfigurationTypeProcessorTests.Process_ComplexInvalidValue.DotNet7_0.verified.txt
│ │ ├── Jobs
│ │ │ ├── JobTypeProcessorTests.Process_InvalidTriggers_jobType=Reprise.UnitTests.Features.Jobs.StubJobNoTriggers.verified.txt
│ │ │ ├── JobTypeProcessorTests.Process_InvalidTriggers_jobType=Reprise.UnitTests.Features.Jobs.StubJobEmptyCron.verified.txt
│ │ │ ├── JobRunnerTests
│ │ │ │ ├── StopAsync.CallsTaskRunner.verified.txt
│ │ │ │ ├── StopAsync.cs
│ │ │ │ └── StartAsync.BeforeStartJobs.verified.txt
│ │ │ ├── DateTimeProviderTests.cs
│ │ │ ├── JobTypeProcessorTests.Process_InvalidTriggers_jobType=Reprise.UnitTests.Features.Jobs.StubJobInvalidCron.verified.txt
│ │ │ └── JobStateRegistryTests.cs
│ │ ├── Validation
│ │ │ └── ValidatorTypeProcessorTests.Process_DuplicateValidator.verified.txt
│ │ ├── Mappers
│ │ │ ├── MapperTypeProcessorTests.Process_DuplicateMapper.verified.txt
│ │ │ └── MapperTypeProcessorTests.Process_DuplicateMirrorMapper.verified.txt
│ │ ├── Authorization
│ │ │ ├── AuthorizationProcessorTests.Process_NoAuthorization.DotNet6_0.verified.txt
│ │ │ ├── AuthorizationProcessorTests.Process.DotNet6_0.verified.txt
│ │ │ ├── AuthorizationProcessorTests.Process_PolicyName.DotNet6_0.verified.txt
│ │ │ ├── AuthorizationProcessorTests.Process_NoAuthorization.DotNet7_0.verified.txt
│ │ │ ├── AuthorizationProcessorTests.Process.DotNet7_0.verified.txt
│ │ │ ├── AuthorizationProcessorTests.Process_MultiplePolicyNames.DotNet6_0.verified.txt
│ │ │ ├── AuthorizationProcessorTests.Process_PolicyName.DotNet7_0.verified.txt
│ │ │ └── AuthorizationProcessorTests.Process_MultiplePolicyNames.DotNet7_0.verified.txt
│ │ └── RateLimiting
│ │ │ ├── RateLimitingProcessorTests.Process_NoRateLimiting.DotNet7_0.verified.txt
│ │ │ └── RateLimitingProcessorTests.Process.DotNet7_0.verified.txt
│ ├── stryker-config.yaml
│ ├── Common
│ │ ├── ExtensionMethodsTests.CreateInstance_Nullable.verified.txt
│ │ ├── ExtensionMethodsTests.GetInternalDependency_MissingService.verified.txt
│ │ ├── ExtensionMethodsTests.CreateInstance_NoCtor.verified.txt
│ │ └── TaskRunnerTests
│ │ │ ├── WhenAll.MultipleMethodsThrow.verified.txt
│ │ │ ├── CreateTimer.cs
│ │ │ ├── TaskRunnerTestBase.cs
│ │ │ ├── Dispose.cs
│ │ │ └── StopTimers.cs
│ ├── ExtensionMethods
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpoints_AppNull.verified.txt
│ │ ├── ApplicationBuilderExtensionsTests.UseExceptionHandling_AppNull.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_AppNull.verified.txt
│ │ ├── WebApplicationBuilderExtensionsTests.ConfigureServices_BuilderNull.verified.txt
│ │ ├── WebApplicationBuilderExtensionsTests.ConfigureServicesAssembly_BuilderNull.verified.txt
│ │ ├── WebApplicationBuilderExtensionsTests.ConfigureServicesAssembly_AssemblyNull.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpoints.DotNet6_0.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpointsOptions.DotNet6_0.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_OptionsNull.DotNet6_0.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpoints.DotNet7_0.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpointsOptions.DotNet7_0.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_OptionsNull.DotNet7_0.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpoints_NoMapper.verified.txt
│ │ ├── EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_NoMapper.verified.txt
│ │ ├── WebApplicationBuilderExtensionsTests.Processors.verified.txt
│ │ ├── ApplicationBuilderExtensionsTests.UseExceptionHandling.verified.txt
│ │ └── ApplicationBuilderExtensionsTests.cs
│ ├── TestHelpers
│ │ └── ServiceScopeIdentifier.cs
│ ├── ReflectionTests.PublicTypes.DotNet6_0.verified.txt
│ ├── ReflectionTests.PublicTypes.DotNet7_0.verified.txt
│ ├── ReflectionTests.NonPublicTypes.DotNet6_0.verified.txt
│ └── Global.cs
├── Reprise.Benchmarks.Api.Carter
│ ├── appsettings.json
│ ├── Global.cs
│ ├── Reprise.Benchmarks.Api.Carter.csproj
│ ├── Properties
│ │ └── launchSettings.json
│ └── Program.cs
├── Reprise.Benchmarks.Api.FastEndpoints
│ ├── Global.cs
│ ├── appsettings.json
│ ├── Reprise.Benchmarks.Api.FastEndpoints.csproj
│ ├── Properties
│ │ └── launchSettings.json
│ └── Program.cs
├── Reprise.Benchmarks.Api.MinimalApis
│ ├── appsettings.json
│ ├── Reprise.Benchmarks.Api.MinimalApis.csproj
│ └── Properties
│ │ └── launchSettings.json
├── Reprise.IntegrationTests
│ ├── RateLimitingTests.GetLimited.verified.txt
│ ├── RateLimitingTests.Get.verified.txt
│ ├── GreetingsTests.PostWaitCancel.DotNet6_0.verified.txt
│ ├── GreetingsTests.PostWaitCancel.DotNet7_0.verified.txt
│ ├── UsersTests.Get_NotFound.DotNet6_0.verified.txt
│ ├── WeatherTests.Get_origin=https---example.com.DotNet6_0.verified.txt
│ ├── UsersTests.Delete.DotNet6_0.verified.txt
│ ├── UsersTests.Delete_NotFound.DotNet6_0.verified.txt
│ ├── UsersTests.Get_NotFound.DotNet7_0.verified.txt
│ ├── UsersTests.Delete.DotNet7_0.verified.txt
│ ├── TokenTests.GetToken.DotNet6_0.verified.txt
│ ├── UsersTests.Delete_NotFound.DotNet7_0.verified.txt
│ ├── HeartbeatJobTests.cs
│ ├── WeatherTests.Get_origin=https---contoso.com.DotNet6_0.verified.txt
│ ├── WeatherTests.Get_origin=https---example.com.DotNet7_0.verified.txt
│ ├── GreetingsTests.Get.DotNet6_0.verified.txt
│ ├── OpenApiTests.cs
│ ├── ThrowTests.cs
│ ├── ThrowTests.Get.DotNet6_0.verified.txt
│ ├── WeatherTests.Get_origin=https---contoso.com.DotNet7_0.verified.txt
│ ├── GreetingsTests.Get.DotNet7_0.verified.txt
│ ├── TokenTests.GetToken.DotNet7_0.verified.txt
│ ├── ThrowTests.Get.DotNet7_0.verified.txt
│ ├── UsersTests.Get.DotNet6_0.verified.txt
│ ├── UsersTests.Update.DotNet6_0.verified.txt
│ ├── UsersTests.Update_NotFound.DotNet6_0.verified.txt
│ ├── UsersTests.Update.DotNet7_0.verified.txt
│ ├── UsersTests.Get.DotNet7_0.verified.txt
│ ├── UsersTests.Update_NotFound.DotNet7_0.verified.txt
│ ├── TokenTests.cs
│ ├── Global.cs
│ ├── GreetingsTests.Post.DotNet6_0.verified.txt
│ ├── GreetingsTests.PostWait.DotNet6_0.verified.txt
│ ├── UsersTests.Create.DotNet6_0.verified.txt
│ ├── GreetingsTests.Post.DotNet7_0.verified.txt
│ ├── GreetingsTests.PostWait.DotNet7_0.verified.txt
│ ├── UsersTests.Create.DotNet7_0.verified.txt
│ ├── WeatherTests.cs
│ ├── TestBase.cs
│ ├── UsersTests.Create_BadRequest.DotNet6_0.verified.txt
│ ├── UsersTests.Update_BadRequest.DotNet6_0.verified.txt
│ ├── UsersTests.Create_BadRequest.DotNet7_0.verified.txt
│ ├── UsersTests.Update_BadRequest.DotNet7_0.verified.txt
│ ├── RateLimitingTests.cs
│ ├── UsersTests.GetAll.DotNet6_0.verified.txt
│ └── UsersTests.GetAll.DotNet7_0.verified.txt
└── Reprise.Benchmarks
│ ├── Global.cs
│ ├── Program.cs
│ ├── BenchmarksBase.cs
│ ├── Reprise.Benchmarks.csproj
│ └── StartupBenchmarks.cs
├── src
└── Reprise
│ ├── icon.png
│ ├── DefaultDocumentation.json
│ ├── Features
│ ├── Jobs
│ │ ├── DateTimeProvider.cs
│ │ ├── IJob.cs
│ │ ├── LoggerExtensions.cs
│ │ ├── JobStateRegistry.cs
│ │ ├── JobState.cs
│ │ └── Attributes.cs
│ ├── Endpoints
│ │ ├── EndpointOptions.cs
│ │ └── EndpointTypeProcessor.cs
│ ├── OpenApi
│ │ ├── ExcludeFromDescription
│ │ │ ├── ExcludeFromDescriptionAttribute.cs
│ │ │ └── ExcludeFromDescriptionProcessor.cs
│ │ ├── Name
│ │ │ ├── NameAttribute.cs
│ │ │ └── NameProcessor.cs
│ │ ├── Tags
│ │ │ └── TagsAttribute.cs
│ │ └── Produces
│ │ │ ├── ProducesProcessor.cs
│ │ │ └── ProducesAttribute.cs
│ ├── ServiceConfigurators
│ │ ├── IServiceConfigurator.cs
│ │ └── ServiceConfiguratorTypeProcessor.cs
│ ├── Authorization
│ │ ├── EndpointOptions.cs
│ │ └── AuthorizationProcessor.cs
│ ├── RateLimiting
│ │ ├── EndpointOptions.cs
│ │ └── RateLimitingProcessor.cs
│ ├── ExceptionHandling
│ │ ├── DefaultErrorResponseFactory.cs
│ │ ├── DefaultExceptionLogger.cs
│ │ ├── ExceptionLoggerTypeProcessor.cs
│ │ ├── ErrorResponseFactoryTypeProcessor.cs
│ │ └── ErrorContext.cs
│ ├── Events
│ │ ├── LoggerExtensions.cs
│ │ └── EventHandlerTypeProcessor.cs
│ ├── Mappers
│ │ ├── IMapper.cs
│ │ └── MapperTypeProcessor.cs
│ ├── Configurations
│ │ └── ConfigurationAttribute.cs
│ ├── Filters
│ │ ├── EndpointOptions.cs
│ │ └── FilterAttribute.cs
│ └── Validation
│ │ └── ValidatorTypeProcessor.cs
│ ├── Common
│ ├── IRouteHandlerBuilderProcessor.cs
│ └── AbstractTypeProcessor.cs
│ ├── Global.cs
│ └── ExtensionMethods
│ └── ApplicationBuilderExtensions.cs
├── .github
├── dependabot.yml
├── workflows
│ ├── codeql.yml
│ └── cd.yml
└── ISSUE_TEMPLATE
│ ├── feature_request.md
│ └── bug_report.md
├── docs
├── Reprise.IEvent.md
├── Reprise.RunOnStartAttribute.md
├── Reprise.RunBeforeStartAttribute.md
├── Reprise.ExcludeFromDescriptionAttribute.md
├── Reprise.IJob.md
├── Reprise.CronAttribute.md
├── Reprise.EndpointAttribute.md
├── Reprise.NameAttribute.md
├── Reprise.GetAttribute.md
├── Reprise.PutAttribute.md
├── Reprise.PostAttribute.md
├── Reprise.PatchAttribute.md
├── Reprise.DeleteAttribute.md
├── Reprise.IServiceConfigurator.md
├── Reprise.TagsAttribute.md
└── Reprise.ConfigurationAttribute.md
├── samples
├── Reprise.SampleApi.WeatherService
│ └── Reprise.SampleApi.WeatherService.csproj
└── Reprise.SampleApi
│ ├── ErrorHandling
│ ├── ProducesBadRequest.cs
│ ├── ExceptionLogger.cs
│ └── ErrorResponseFactory.cs
│ ├── Endpoints
│ ├── GetThrowEndpoint.cs
│ ├── Users
│ │ ├── GetAllUsersEndpoint.cs
│ │ ├── DeleteUserEndpoint.cs
│ │ ├── GetUserEndpoint.cs
│ │ ├── UpdateUserEndpoint.cs
│ │ ├── CreateUserEndpoint.cs
│ │ └── Common.cs
│ ├── Greetings
│ │ ├── PostGreetingsEndpoint.cs
│ │ ├── GreetingsEventBus.cs
│ │ ├── PostGreetingsWaitEndpoint.cs
│ │ └── GetGreetingsEndpoint.cs
│ ├── GetTokenEndpoint.cs
│ ├── GetLimitedEndpoint.cs
│ └── GetWeatherEndpoint.cs
│ ├── Properties
│ └── launchSettings.json
│ ├── Filters
│ ├── GreetingFilter.cs
│ └── TraceIdFilter.cs
│ ├── Global.cs
│ ├── Data
│ └── DataContext.cs
│ ├── Jobs
│ └── BeforeStartJob.cs
│ └── Reprise.SampleApi.csproj
├── Directory.Build.props
└── LICENSE
/tests/Reprise.Benchmarks.Api/Global.cs:
--------------------------------------------------------------------------------
1 | global using FluentValidation;
2 |
--------------------------------------------------------------------------------
/src/Reprise/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yavorfingarov/Reprise/HEAD/src/Reprise/icon.png
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointTypeProcessorTests.Process.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | StubEndpointWithAttribute
3 | ]
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/stryker-config.yaml:
--------------------------------------------------------------------------------
1 | stryker-config:
2 | target-framework: 'net7.0'
3 | reporters: [ 'html', 'markdown' ]
4 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "AllowedHosts": "*",
3 | "Greeting": {
4 | "Message": "Hello, world!"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/DefaultExceptionLoggerTests.Log_ValidationException.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {},
3 | logs: []
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/ErrorContextTests.Request.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | Method: HttpContext.get_Request()
4 | }
5 | ]
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.Carter/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "AllowedHosts": "*",
3 | "Greeting": {
4 | "Message": "Hello, world!"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.FastEndpoints/Global.cs:
--------------------------------------------------------------------------------
1 | global using FastEndpoints;
2 | global using FluentValidation;
3 | global using Microsoft.Extensions.Options;
4 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.FastEndpoints/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "AllowedHosts": "*",
3 | "Greeting": {
4 | "Message": "Hello, world!"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.MinimalApis/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "AllowedHosts": "*",
3 | "Greeting": {
4 | "Message": "Hello, world!"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/ErrorContextTests.TraceIdentifier.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | Method: HttpContext.get_TraceIdentifier()
4 | }
5 | ]
--------------------------------------------------------------------------------
/src/Reprise/DefaultDocumentation.json:
--------------------------------------------------------------------------------
1 | {
2 | "OutputDirectoryPath": "..\\..\\docs",
3 | "GeneratedPages": "Namespaces,Types",
4 | "Markdown.IgnoreLineBreak": true
5 | }
6 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/RateLimitingTests.GetLimited.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 503 Service Unavailable,
4 | RequestMessage: http://localhost/limited
5 | }
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: nuget
4 | directory: /
5 | schedule:
6 | interval: daily
7 | assignees:
8 | - yavorfingarov
9 |
--------------------------------------------------------------------------------
/docs/Reprise.IEvent.md:
--------------------------------------------------------------------------------
1 | ### [Reprise](Reprise.md 'Reprise')
2 |
3 | ## IEvent Interface
4 |
5 | Marker interface to represent an event.
6 |
7 | ```csharp
8 | public interface IEvent
9 | ```
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.Carter/Global.cs:
--------------------------------------------------------------------------------
1 | global using Carter;
2 | global using Carter.ModelBinding;
3 | global using FluentValidation;
4 | global using Microsoft.Extensions.Options;
5 |
--------------------------------------------------------------------------------
/src/Reprise/Features/Jobs/DateTimeProvider.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise
2 | {
3 | internal class DateTimeProvider
4 | {
5 | public virtual DateTime UtcNow => DateTime.UtcNow;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/ExceptionHandlerTests.InvokeAsync.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {
3 | _MockHttpContext: [],
4 | nextInvoked: true
5 | },
6 | logs: []
7 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.Add.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | Reprise.UnitTests.Features.Endpoints.StubGetEndpoint,
3 | Reprise.UnitTests.Features.Endpoints.StubPostEndpoint
4 | ]
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Common/ExtensionMethodsTests.CreateInstance_Nullable.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: System.Nullable`1[System.Int32] could not be instantiated.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpoints_AppNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: ArgumentNullException,
3 | Message: Value cannot be null.,
4 | ParamName: app
5 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/RateLimitingTests.Get.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | trace-id: {Scrubbed}
6 | },
7 | RequestMessage: http://localhost/limited
8 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/ApplicationBuilderExtensionsTests.UseExceptionHandling_AppNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: ArgumentNullException,
3 | Message: Value cannot be null.,
4 | ParamName: app
5 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_AppNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: ArgumentNullException,
3 | Message: Value cannot be null.,
4 | ParamName: app
5 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/WebApplicationBuilderExtensionsTests.ConfigureServices_BuilderNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: ArgumentNullException,
3 | Message: Value cannot be null.,
4 | ParamName: builder
5 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/WebApplicationBuilderExtensionsTests.ConfigureServicesAssembly_BuilderNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: ArgumentNullException,
3 | Message: Value cannot be null.,
4 | ParamName: builder
5 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/OpenApi/Name/NameProcessorTests.Process_EmptyName.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.OpenApi.Name.StubNameEndpoint has an empty name.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/GreetingsTests.PostWaitCancel.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Log: [
3 | [GreetingHandler] Received greeting with message: Hello, world!,
4 | [SlowerGreetingHandler] Task was cancelled.
5 | ]
6 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/GreetingsTests.PostWaitCancel.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Log: [
3 | [GreetingHandler] Received greeting with message: Hello, world!,
4 | [SlowerGreetingHandler] Task was cancelled.
5 | ]
6 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/WebApplicationBuilderExtensionsTests.ConfigureServicesAssembly_AssemblyNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: ArgumentNullException,
3 | Message: Value cannot be null.,
4 | ParamName: assembly
5 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Events/EventBusTests/Publish.PayloadNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {
3 | Type: ArgumentNullException,
4 | Message: Value cannot be null.,
5 | ParamName: payload
6 | },
7 | logs: []
8 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/OpenApi/Tags/TagsProcessorTests.Process_EmptyTag.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.OpenApi.Tags.StubTagType.WithEmptyTag has an empty tag.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/TestHelpers/ServiceScopeIdentifier.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.UnitTests.TestHelpers
2 | {
3 | internal class ServiceScopeIdentifier
4 | {
5 | public Guid ScopeId { get; } = Guid.NewGuid();
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_EmptyRoute.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Endpoints.StubEndpointEmptyRoute.Handle has an empty route.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Events/EventBusTests/PublishAndWait.PayloadNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {
3 | Type: ArgumentNullException,
4 | Message: Value cannot be null.,
5 | ParamName: payload
6 | },
7 | logs: []
8 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_EmptyHttpMethod.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Endpoints.StubEndpointEmptyHttpMethod.Handle has an empty HTTP method.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_NoHandleMethod.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Endpoints.StubEndpointNoHandleMethod has no public static Handle method.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Filters/EndpointFilterTests.EndpointFilter_NoImplementation.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Filters.StubFilterNoImplementation does not implement IEndpointFilter.
4 | }
--------------------------------------------------------------------------------
/src/Reprise/Common/IRouteHandlerBuilderProcessor.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise
2 | {
3 | internal interface IRouteHandlerBuilderProcessor
4 | {
5 | void Process(RouteHandlerBuilder builder, MethodInfo handlerInfo, EndpointOptions options, string route);
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks/Global.cs:
--------------------------------------------------------------------------------
1 | global using BenchmarkDotNet.Attributes;
2 |
3 | using System.Diagnostics.CodeAnalysis;
4 |
5 | [assembly: SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "BenchmarkDotNet doesn't support static methods.")]
6 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Get_NotFound.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 404 Not Found,
4 | RequestMessage: {
5 | Uri: http://localhost/users/7,
6 | Headers: {
7 | Authorization: {Scrubbed}
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/WeatherTests.Get_origin=https---example.com.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Request: {
5 | Uri: http://localhost/weather,
6 | Headers: {
7 | Origin: https://example.com
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Configurations/ConfigurationTypeProcessorTests.Process_EmptySubSectionKey.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Configurations.StubConfigurationEmptySubSectionKey has an empty sub-section key.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_MultipleHandleMethods.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Endpoints.StubEndpointMultipleHandleMethod has more than one public static Handle method.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Jobs/JobTypeProcessorTests.Process_InvalidTriggers_jobType=Reprise.UnitTests.Features.Jobs.StubJobNoTriggers.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Jobs.StubJobNoTriggers has no run triggers.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_NoMethodRouteAttribute.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Endpoints.StubEndpointNoMethodRouteAttribute.Handle has no HTTP method and route attribute.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Jobs/JobTypeProcessorTests.Process_InvalidTriggers_jobType=Reprise.UnitTests.Features.Jobs.StubJobEmptyCron.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Jobs.StubJobEmptyCron has an empty cron expression.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Delete.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 204 No Content,
4 | RequestMessage: {
5 | Method: DELETE,
6 | Uri: http://localhost/users/2,
7 | Headers: {
8 | Authorization: {Scrubbed}
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Delete_NotFound.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 404 Not Found,
4 | RequestMessage: {
5 | Method: DELETE,
6 | Uri: http://localhost/users/7,
7 | Headers: {
8 | Authorization: {Scrubbed}
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_DuplicateRoute.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: GET / is handled by both Reprise.UnitTests.Features.Endpoints.StubDuplicateGetEndpoint and Reprise.UnitTests.Features.Endpoints.StubGetEndpoint.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Endpoints/EndpointMapperTests.MapEndpoints_MultipleMethodRouteAttributes.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Endpoints.StubEndpointMultipleMethodRouteAttributes.Handle has multiple HTTP method and route attributes.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/OpenApi/Name/NameProcessorTests.Process_Duplicate.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Name 'Test' is used by both Reprise.UnitTests.Features.OpenApi.Name.StubNameEndpointDuplicate and Reprise.UnitTests.Features.OpenApi.Name.StubNameEndpoint.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Configurations/ConfigurationTypeProcessorTests.Process_InvalidSubSectionKey.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Configurations.StubConfigurationInvalidSubSection has a sub-section key that doesn't match any configuration data.
4 | }
--------------------------------------------------------------------------------
/src/Reprise/Features/Endpoints/EndpointOptions.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise
2 | {
3 | ///
4 | /// Provides configuration for API endpoints.
5 | ///
6 | public sealed partial class EndpointOptions
7 | {
8 | internal EndpointOptions()
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Get_NotFound.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 404 Not Found,
4 | Headers: {
5 | trace-id: {Scrubbed}
6 | },
7 | RequestMessage: {
8 | Uri: http://localhost/users/7,
9 | Headers: {
10 | Authorization: {Scrubbed}
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Jobs/JobRunnerTests/StopAsync.CallsTaskRunner.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {
3 | MockTaskRunner: [
4 | {
5 | Method: TaskRunner.StopTimers(),
6 | ReturnValue: {
7 | Status: RanToCompletion
8 | }
9 | }
10 | ]
11 | },
12 | logs: []
13 | }
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api/Reprise.Benchmarks.Api.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.Carter/Reprise.Benchmarks.Api.Carter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/DefaultExceptionLoggerTests.Log_Exception.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {},
3 | logs: [
4 | {
5 | Error: An exception was thrown while executing the request.,
6 | Exception: {
7 | Type: Exception,
8 | Message: Test message
9 | }
10 | }
11 | ]
12 | }
--------------------------------------------------------------------------------
/src/Reprise/Common/AbstractTypeProcessor.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise
2 | {
3 | internal abstract class AbstractTypeProcessor
4 | {
5 | public virtual void PostProcess(WebApplicationBuilder builder)
6 | {
7 | }
8 |
9 | public abstract void Process(WebApplicationBuilder builder, Type type);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Delete.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 204 No Content,
4 | Headers: {
5 | trace-id: {Scrubbed}
6 | },
7 | RequestMessage: {
8 | Method: DELETE,
9 | Uri: http://localhost/users/2,
10 | Headers: {
11 | Authorization: {Scrubbed}
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/samples/Reprise.SampleApi.WeatherService/Reprise.SampleApi.WeatherService.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0;net7.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/TokenTests.GetToken.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Content: {
5 | Headers: {
6 | Content-Type: application/json; charset=utf-8
7 | },
8 | Value: {
9 | type: Bearer,
10 | token: {Scrubbed}
11 | }
12 | },
13 | Request: http://localhost/token
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Delete_NotFound.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 404 Not Found,
4 | Headers: {
5 | trace-id: {Scrubbed}
6 | },
7 | RequestMessage: {
8 | Method: DELETE,
9 | Uri: http://localhost/users/7,
10 | Headers: {
11 | Authorization: {Scrubbed}
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Filters/ValidationFilterTests.NullableTypeNull.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Content: {
5 | Headers: {
6 | Content-Type: text/plain; charset=utf-8
7 | },
8 | Value: No message
9 | },
10 | Request: {
11 | Method: POST,
12 | Uri: http://localhost/
13 | }
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Validation/ValidatorTypeProcessorTests.Process_DuplicateValidator.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Validation.StubValidatedType is validated by both Reprise.UnitTests.Features.Validation.StubDuplicateValidator and Reprise.UnitTests.Features.Validation.StubValidator.
4 | }
--------------------------------------------------------------------------------
/src/Reprise/Features/Jobs/IJob.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise
2 | {
3 | ///
4 | /// Specifies the contract for running jobs.
5 | ///
6 | public interface IJob
7 | {
8 | ///
9 | /// Runs the job.
10 | ///
11 | Task Run(CancellationToken cancellationToken);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.MinimalApis/Reprise.Benchmarks.Api.MinimalApis.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/HeartbeatJobTests.cs:
--------------------------------------------------------------------------------
1 | using Reprise.SampleApi.Jobs;
2 |
3 | namespace Reprise.IntegrationTests
4 | {
5 | public class HeartbeatJobTests : TestBase
6 | {
7 | [Fact]
8 | public void Invocations()
9 | {
10 | Assert.True(BeforeStartJob.Invocations > 0);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/WeatherTests.Get_origin=https---contoso.com.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | Access-Control-Allow-Origin: https://contoso.com
6 | },
7 | Request: {
8 | Uri: http://localhost/weather,
9 | Headers: {
10 | Origin: https://contoso.com
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/WeatherTests.Get_origin=https---example.com.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | greeting: Hello!,
6 | trace-id: {Scrubbed}
7 | },
8 | Request: {
9 | Uri: http://localhost/weather,
10 | Headers: {
11 | Origin: https://example.com
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpoints.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | EndpointOptions: {},
3 | Processors: [
4 | Reprise.AuthorizationProcessor,
5 | Reprise.ExcludeFromDescriptionProcessor,
6 | Reprise.NameProcessor,
7 | Reprise.ProducesProcessor,
8 | Reprise.TagsProcessor
9 | ]
10 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Configurations/ConfigurationTypeProcessorTests.Process_DuplicateConfiguration.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Sub-section key 'TestConfiguration' is bound to both Reprise.UnitTests.Features.Configurations.StubConfigurationDuplicate and Reprise.UnitTests.Features.Configurations.StubConfiguration.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.FastEndpoints/Reprise.Benchmarks.Api.FastEndpoints.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net7.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpointsOptions.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | EndpointOptions: {},
3 | Processors: [
4 | Reprise.AuthorizationProcessor,
5 | Reprise.ExcludeFromDescriptionProcessor,
6 | Reprise.NameProcessor,
7 | Reprise.ProducesProcessor,
8 | Reprise.TagsProcessor
9 | ]
10 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/ExceptionLoggerTypeProcessorTests.Process_DuplicateExceptionLogger.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: IExceptionLogger is implemented by both Reprise.UnitTests.Features.ExceptionHandling.StubExceptionLogger and Reprise.UnitTests.Features.ExceptionHandling.StubDuplicateExceptionLogger.
4 | }
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | enable
5 | enable
6 | True
7 | True
8 | latest-recommended
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/Reprise.SampleApi/ErrorHandling/ProducesBadRequest.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.SampleApi.ErrorHandling
2 | {
3 | public class ProducesBadRequestAttribute : ProducesAttribute
4 | {
5 | public ProducesBadRequestAttribute() :
6 | base(StatusCodes.Status400BadRequest, typeof(ErrorResponse), null)
7 | {
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_OptionsNull.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | EndpointOptions: {},
3 | Processors: [
4 | Reprise.AuthorizationProcessor,
5 | Reprise.ExcludeFromDescriptionProcessor,
6 | Reprise.NameProcessor,
7 | Reprise.ProducesProcessor,
8 | Reprise.TagsProcessor
9 | ]
10 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Configurations/ConfigurationTypeProcessorTests.Process_MissingProperty.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: 'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of Reprise.UnitTests.Features.Configurations.StubConfiguration: 'AnotherNumber'
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Filters/EndpointFilterTests.EndpointFilter.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | filter-invocations: StubFilterA
6 | },
7 | Content: {
8 | Headers: {
9 | Content-Type: text/plain; charset=utf-8
10 | },
11 | Value: Hello, world!
12 | },
13 | Request: http://localhost/
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/GreetingsTests.Get.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Content: {
5 | Headers: {
6 | Content-Type: application/json; charset=utf-8
7 | },
8 | Value: [
9 | Hello, Alice!,
10 | Hello, John!,
11 | Hello, Skylar!
12 | ]
13 | },
14 | Request: http://localhost/greetings
15 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Configurations/ConfigurationTypeProcessorTests.Process_ComplexMissingProperty.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: 'ErrorOnUnknownConfiguration' was set on the provided BinderOptions, but the following properties were not found on the instance of Reprise.UnitTests.Features.Configurations.StubConfigurationSection: 'Number'
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Mappers/MapperTypeProcessorTests.Process_DuplicateMapper.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Mappers.StubType1 and Reprise.UnitTests.Features.Mappers.StubType2 are mapped by both Reprise.UnitTests.Features.Mappers.StubTypeDuplicateMapper and Reprise.UnitTests.Features.Mappers.StubTypeMapper.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks/Program.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Running;
2 |
3 | namespace Reprise.Benchmarks
4 | {
5 | public class Program
6 | {
7 | public static void Main(string[] args)
8 | {
9 | BenchmarkRunner.Run(args: args);
10 | BenchmarkRunner.Run(args: args);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/OpenApiTests.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.IntegrationTests
2 | {
3 | public class OpenApiTests : TestBase
4 | {
5 | [Fact]
6 | public async Task SwaggerJson()
7 | {
8 | await Verify(await Client.GetAsync("/swagger/v1/swagger.json"))
9 | .UniqueForRuntimeAndVersion();
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Reprise/Features/OpenApi/ExcludeFromDescription/ExcludeFromDescriptionAttribute.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise
2 | {
3 | ///
4 | /// Specifies an API endpoint that is excluded from the OpenAPI description.
5 | ///
6 | [AttributeUsage(AttributeTargets.Method)]
7 | public sealed class ExcludeFromDescriptionAttribute : Attribute
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/ErrorResponseFactoryTypeProcessorTests.Process_DuplicateErrorResponseFactory.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: IErrorResponseFactory is implemented by both Reprise.UnitTests.Features.ExceptionHandling.StubErrorResponseFactory and Reprise.UnitTests.Features.ExceptionHandling.StubDuplicateErrorResponseFactory.
4 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Mappers/MapperTypeProcessorTests.Process_DuplicateMirrorMapper.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Features.Mappers.StubType2 and Reprise.UnitTests.Features.Mappers.StubType1 are mapped by both Reprise.UnitTests.Features.Mappers.StubTypeDuplicateMirrorMapper and Reprise.UnitTests.Features.Mappers.StubTypeMapper.
4 | }
--------------------------------------------------------------------------------
/.github/workflows/codeql.yml:
--------------------------------------------------------------------------------
1 | name: CodeQL
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 | branches: [ master ]
7 | pull_request:
8 | branches: [ master ]
9 | schedule:
10 | - cron: 0 3 * * 1
11 |
12 | jobs:
13 | analyze:
14 | name: Analyze
15 | permissions:
16 | security-events: write
17 | uses: yavorfingarov/Workflows/.github/workflows/codeql.yml@master
18 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/ThrowTests.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.IntegrationTests
2 | {
3 | public class ThrowTests : TestBase
4 | {
5 | [Fact]
6 | public async Task Get()
7 | {
8 | await Verify(await Client.GetAsync("/throw"))
9 | .ScrubMember("trace-id")
10 | .UniqueForRuntimeAndVersion();
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/ThrowTests.Get.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 500 Internal Server Error,
4 | Content: {
5 | Headers: {
6 | Content-Type: application/json; charset=utf-8
7 | },
8 | Value: {
9 | message: The method or operation is not implemented.,
10 | details: null
11 | }
12 | },
13 | Request: http://localhost/throw
14 | }
--------------------------------------------------------------------------------
/samples/Reprise.SampleApi/Endpoints/GetThrowEndpoint.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.SampleApi.Endpoints
2 | {
3 | [Endpoint]
4 | public class GetThrowEndpoint
5 | {
6 | [Get("/throw")]
7 | [AllowAnonymous]
8 | [ExcludeFromDescription]
9 | public static IResult Handle()
10 | {
11 | throw new NotImplementedException();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Development": {
4 | "commandName": "Project",
5 | "dotnetRunMessages": true,
6 | "applicationUrl": "http://localhost:5039",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Filters/EndpointFilterTests.GlobalEndpointFilters.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | filter-invocations: StubFilterA / StubFilterB / StubFilterC
6 | },
7 | Content: {
8 | Headers: {
9 | Content-Type: text/plain; charset=utf-8
10 | },
11 | Value: Hello, world!
12 | },
13 | Request: http://localhost/
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.Carter/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Development": {
4 | "commandName": "Project",
5 | "dotnetRunMessages": true,
6 | "applicationUrl": "http://localhost:5039",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/WeatherTests.Get_origin=https---contoso.com.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | Access-Control-Allow-Origin: https://contoso.com,
6 | greeting: Hello!,
7 | trace-id: {Scrubbed}
8 | },
9 | Request: {
10 | Uri: http://localhost/weather,
11 | Headers: {
12 | Origin: https://contoso.com
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.FastEndpoints/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Development": {
4 | "commandName": "Project",
5 | "dotnetRunMessages": true,
6 | "applicationUrl": "http://localhost:5039",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks.Api.MinimalApis/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Development": {
4 | "commandName": "Project",
5 | "dotnetRunMessages": true,
6 | "applicationUrl": "http://localhost:5039",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Filters/EndpointFilterTests.GlobalEndpointFilters_EndpointFilter.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | filter-invocations: StubFilterB / StubFilterC / StubFilterA
6 | },
7 | Content: {
8 | Headers: {
9 | Content-Type: text/plain; charset=utf-8
10 | },
11 | Value: Hello, world!
12 | },
13 | Request: http://localhost/
14 | }
--------------------------------------------------------------------------------
/samples/Reprise.SampleApi/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Development": {
4 | "commandName": "Project",
5 | "dotnetRunMessages": true,
6 | "applicationUrl": "https://localhost:7008;http://localhost:5008",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpoints.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | EndpointOptions: {},
3 | Processors: [
4 | Reprise.AuthorizationProcessor,
5 | Reprise.FilterProcessor,
6 | Reprise.ExcludeFromDescriptionProcessor,
7 | Reprise.NameProcessor,
8 | Reprise.ProducesProcessor,
9 | Reprise.TagsProcessor,
10 | Reprise.RateLimitingProcessor
11 | ]
12 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/GreetingsTests.Get.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | trace-id: {Scrubbed}
6 | },
7 | Content: {
8 | Headers: {
9 | Content-Type: application/json; charset=utf-8
10 | },
11 | Value: [
12 | Hello, Alice!,
13 | Hello, John!,
14 | Hello, Skylar!
15 | ]
16 | },
17 | Request: http://localhost/greetings
18 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/TokenTests.GetToken.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | greeting: Hello!,
6 | trace-id: {Scrubbed}
7 | },
8 | Content: {
9 | Headers: {
10 | Content-Type: application/json; charset=utf-8
11 | },
12 | Value: {
13 | type: Bearer,
14 | token: {Scrubbed}
15 | }
16 | },
17 | Request: http://localhost/token
18 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpointsOptions.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | EndpointOptions: {},
3 | Processors: [
4 | Reprise.AuthorizationProcessor,
5 | Reprise.FilterProcessor,
6 | Reprise.ExcludeFromDescriptionProcessor,
7 | Reprise.NameProcessor,
8 | Reprise.ProducesProcessor,
9 | Reprise.TagsProcessor,
10 | Reprise.RateLimitingProcessor
11 | ]
12 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/ExceptionHandling/DefaultExceptionLoggerTests.Log_BadHttpRequestException.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | target: {},
3 | logs: [
4 | {
5 | Error: BadHttpRequestException: Test message,
6 | State: [
7 | {
8 | Message: Test message
9 | },
10 | {
11 | {OriginalFormat}: BadHttpRequestException: {Message}
12 | }
13 | ]
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/tests/Reprise.Benchmarks/BenchmarksBase.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc.Testing;
2 |
3 | namespace Reprise.Benchmarks
4 | {
5 | public abstract class BenchmarksBase
6 | {
7 | public static HttpClient CreateClient() where T : class
8 | {
9 | var webApplicationFactory = new WebApplicationFactory();
10 |
11 | return webApplicationFactory.CreateClient();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Filters/EndpointFilterTests.GlobalEndpointFilters_EndpointMultipleFilters.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Headers: {
5 | filter-invocations: StubFilterD / StubFilterC / StubFilterB / StubFilterA
6 | },
7 | Content: {
8 | Headers: {
9 | Content-Type: text/plain; charset=utf-8
10 | },
11 | Value: Hello, world!
12 | },
13 | Request: http://localhost/
14 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_OptionsNull.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | EndpointOptions: {},
3 | Processors: [
4 | Reprise.AuthorizationProcessor,
5 | Reprise.FilterProcessor,
6 | Reprise.ExcludeFromDescriptionProcessor,
7 | Reprise.NameProcessor,
8 | Reprise.ProducesProcessor,
9 | Reprise.TagsProcessor,
10 | Reprise.RateLimitingProcessor
11 | ]
12 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Jobs/DateTimeProviderTests.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.UnitTests.Features.Jobs
2 | {
3 | public class DateTimeProviderTests
4 | {
5 | [Fact]
6 | public void UtcNow()
7 | {
8 | var dateTimeProvider = new DateTimeProvider();
9 |
10 | Assert.Equal(DateTime.UtcNow, dateTimeProvider.UtcNow, precision: TimeSpan.FromMilliseconds(50));
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpoints_NoMapper.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise could not resolve an internal dependency. Have you called 'builder.ConfigureServices()'?,
4 | InnerException: {
5 | $type: InvalidOperationException,
6 | Type: InvalidOperationException,
7 | Message: No service for type 'Reprise.EndpointMapper' has been registered.
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/ThrowTests.Get.DotNet7_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 500 Internal Server Error,
4 | Headers: {
5 | trace-id: {Scrubbed}
6 | },
7 | Content: {
8 | Headers: {
9 | Content-Type: application/json; charset=utf-8
10 | },
11 | Value: {
12 | message: The method or operation is not implemented.,
13 | details: null
14 | }
15 | },
16 | Request: http://localhost/throw
17 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Common/ExtensionMethodsTests.GetInternalDependency_MissingService.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise could not resolve an internal dependency. Have you called 'builder.ConfigureServices()'?,
4 | InnerException: {
5 | $type: InvalidOperationException,
6 | Type: InvalidOperationException,
7 | Message: No service for type 'Reprise.UnitTests.Common.StubType' has been registered.
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Get.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 200 OK,
4 | Content: {
5 | Headers: {
6 | Content-Type: application/json; charset=utf-8
7 | },
8 | Value: {
9 | id: 2,
10 | firstName: Cornell,
11 | lastName: Ratke
12 | }
13 | },
14 | Request: {
15 | Uri: http://localhost/users/2,
16 | Headers: {
17 | Authorization: {Scrubbed}
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Update.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 204 No Content,
4 | RequestMessage: {
5 | Method: PUT,
6 | Uri: http://localhost/users/2,
7 | Headers: {
8 | Authorization: {Scrubbed}
9 | },
10 | Content: {
11 | Headers: {
12 | Content-Length: 55,
13 | Content-Type: application/json; charset=utf-8
14 | },
15 | Value:
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Common/ExtensionMethodsTests.CreateInstance_NoCtor.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise.UnitTests.Common.StubTypeNoCtor could not be instantiated. Check the inner exception for more details.,
4 | InnerException: {
5 | $type: MissingMethodException,
6 | Type: MissingMethodException,
7 | Message: No parameterless constructor defined for type 'Reprise.UnitTests.Common.StubTypeNoCtor'.
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Common/TaskRunnerTests/WhenAll.MultipleMethodsThrow.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | exception: {
3 | Type: AggregateException,
4 | InnerExceptions: [
5 | {
6 | Type: Exception,
7 | Message: Test message
8 | },
9 | {
10 | Type: Exception,
11 | Message: Test message
12 | },
13 | {
14 | Type: Exception,
15 | Message: Test message
16 | }
17 | ]
18 | }
19 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/EndpointRouteBuilderExtensionsTests.MapEndpointsOptions_NoMapper.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Type: InvalidOperationException,
3 | Message: Reprise could not resolve an internal dependency. Have you called 'builder.ConfigureServices()'?,
4 | InnerException: {
5 | $type: InvalidOperationException,
6 | Type: InvalidOperationException,
7 | Message: No service for type 'Reprise.EndpointMapper' has been registered.
8 | }
9 | }
--------------------------------------------------------------------------------
/tests/Reprise.IntegrationTests/UsersTests.Update_NotFound.DotNet6_0.verified.txt:
--------------------------------------------------------------------------------
1 | {
2 | Version: 1.1,
3 | Status: 404 Not Found,
4 | RequestMessage: {
5 | Method: PUT,
6 | Uri: http://localhost/users/7,
7 | Headers: {
8 | Authorization: {Scrubbed}
9 | },
10 | Content: {
11 | Headers: {
12 | Content-Length: 55,
13 | Content-Type: application/json; charset=utf-8
14 | },
15 | Value:
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/ExtensionMethods/WebApplicationBuilderExtensionsTests.Processors.verified.txt:
--------------------------------------------------------------------------------
1 | [
2 | Reprise.ConfigurationTypeProcessor,
3 | Reprise.EndpointTypeProcessor,
4 | Reprise.EventHandlerTypeProcessor,
5 | Reprise.ErrorResponseFactoryTypeProcessor,
6 | Reprise.ExceptionLoggerTypeProcessor,
7 | Reprise.JobTypeProcessor,
8 | Reprise.MapperTypeProcessor,
9 | Reprise.ServiceConfiguratorTypeProcessor,
10 | Reprise.ValidatorTypeProcessor
11 | ]
--------------------------------------------------------------------------------
/tests/Reprise.UnitTests/Features/Jobs/JobRunnerTests/StopAsync.cs:
--------------------------------------------------------------------------------
1 | namespace Reprise.UnitTests.Features.Jobs.JobRunnerTests
2 | {
3 | public class StopAsync : JobRunnerTestBase
4 | {
5 | [Fact]
6 | public async Task CallsTaskRunner()
7 | {
8 | ConfigureServices();
9 |
10 | await JobRunner.StopAsync(CancellationToken.None);
11 |
12 | await Verify(new { MockTaskRunner });
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/samples/Reprise.SampleApi/Filters/GreetingFilter.cs:
--------------------------------------------------------------------------------
1 | #if NET7_0
2 | namespace Reprise.SampleApi.Filters
3 | {
4 | public class GreetingFilter : IEndpointFilter
5 | {
6 | public ValueTask