Skip to content

Fixed source generators for use in Visual Studio #126

Fixed source generators for use in Visual Studio

Fixed source generators for use in Visual Studio #126

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / All Tests succeeded Jan 12, 2024 in 0s

All Tests ✅

Tests failed

Report Passed Failed Skipped Time
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_34.trx 273✅ 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_35.trx 151✅ 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_36.trx 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_36[1].trx 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_38.trx 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_39.trx 35✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_39[1].trx 59✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_43.trx 11✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_43[1].trx 219✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46.trx 42✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[1].trx 48✅ 7s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx 19✅ 8❌ 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_47.trx 22✅ 9s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_49.trx 79✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_50.trx 17✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_51.trx 7✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_52.trx 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_52[1].trx 10✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_53.trx 135✅ 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_54.trx 22✅ 6s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_55.trx 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_55[1].trx 42✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_58.trx 8✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_58[1].trx 10✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_58[2].trx 19✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_00.trx 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_00[1].trx 12✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_00[2].trx 70✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_02.trx 1s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_03.trx 2✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_03[1].trx 20✅ 5s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_05.trx 150✅ 10s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_06.trx 17✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_06[1].trx 45✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_09.trx 14✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_09[1].trx 37✅ 4s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_10.trx 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_11.trx 1s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_13.trx 92✅ 15s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_14.trx 6✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_14[1].trx 2✅ 2s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_15.trx 23✅ 3s
src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_16.trx 4✅ 1s

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_34.trx

273 tests were completed in 4s with 273 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Common.UnitTests.CountryCodesSpec 12✅ 28ms
Common.UnitTests.ErrorSpec 6✅ 4ms
Common.UnitTests.Extensions.CollectionExtensionsSpec 3✅ 19ms
Common.UnitTests.Extensions.DateTimeExtensionsSpec 37✅ 14ms
Common.UnitTests.Extensions.DictionaryExtensionsSpec 12✅ 37ms
Common.UnitTests.Extensions.EnumExtensionsSpec 10✅ 8ms
Common.UnitTests.Extensions.ObjectExtensionsSpec 16✅ 202ms
Common.UnitTests.Extensions.StringExtensionsSpec 48✅ 27ms
Common.UnitTests.Extensions.TimeSpanExtensionsSpec 7✅ 27ms
Common.UnitTests.OptionalOfTSpec 50✅ 160ms
Common.UnitTests.OptionalSpec 16✅ 89ms
Common.UnitTests.Recording.RecordingExtensionsSpec 2✅ 151ms
Common.UnitTests.ReflectorSpec 3✅ 42ms
Common.UnitTests.ResultSpec+ResultWithoutValueSpec 14✅ 6ms
Common.UnitTests.ResultSpec+ResultWithValueSpec 31✅ 130ms
Common.UnitTests.TimezonesSpec 6✅ 155ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_35.trx

151 tests were completed in 4s with 151 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Web.Api.Common.UnitTests.ContentNegotiationFilterSpec 25✅ 246ms
Infrastructure.Web.Api.Common.UnitTests.Extensions.HasGetOptionsExtensionsSpec 6✅ 96ms
Infrastructure.Web.Api.Common.UnitTests.Extensions.HasSearchOptionsExtensionsSpec 9✅ 105ms
Infrastructure.Web.Api.Common.UnitTests.Extensions.HttpRequestExtensionsSpec 35✅ 133ms
Infrastructure.Web.Api.Common.UnitTests.Extensions.HttpResponseExtensionsSpec 3✅ 5ms
Infrastructure.Web.Api.Common.UnitTests.Extensions.RequestExtensionsSpec 15✅ 31ms
Infrastructure.Web.Api.Common.UnitTests.Extensions.ServiceCollectionExtensionsSpec 5✅ 21ms
Infrastructure.Web.Api.Common.UnitTests.HasGetOptionsSpec 4✅ 8ms
Infrastructure.Web.Api.Common.UnitTests.HMACSignerSpec+GivenARequest 5✅ 55ms
Infrastructure.Web.Api.Common.UnitTests.HMACSignerSpec+GivenASigner 3✅ 4ms
Infrastructure.Web.Api.Common.UnitTests.JsonDateTimeConverterSpec 6✅ 49ms
Infrastructure.Web.Api.Common.UnitTests.RequestCorrelationFilterSpec 3✅ 73ms
Infrastructure.Web.Api.Common.UnitTests.Validation.AdditionalValidatorSpec 5✅ 90ms
Infrastructure.Web.Api.Common.UnitTests.Validation.HasGetOptionsValidatorSpec 10✅ 29ms
Infrastructure.Web.Api.Common.UnitTests.Validation.HasSearchOptionsValidatorSpec 15✅ 182ms
Infrastructure.Web.Api.Common.UnitTests.ValidationBehaviorSpec 2✅ 149ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_36.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_36[1].trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_38.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_39.trx

35 tests were completed in 3s with 35 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CarsInfrastructure.UnitTests.Api.Cars.DeleteCarRequestValidatorSpec 1✅ 10ms
CarsInfrastructure.UnitTests.Api.Cars.GetCarRequestValidatorSpec 1✅ 26ms
CarsInfrastructure.UnitTests.Api.Cars.RegisterCarRequestValidatorSpec 9✅ 36ms
CarsInfrastructure.UnitTests.Api.Cars.ReleaseCarAvailabilityRequestValidatorSpec 4✅ 170ms
CarsInfrastructure.UnitTests.Api.Cars.ReserveCarIfAvailableRequestValidatorSpec 6✅ 193ms
CarsInfrastructure.UnitTests.Api.Cars.ScheduleMaintenanceCarRequestValidatorSpec 4✅ 12ms
CarsInfrastructure.UnitTests.Api.Cars.SearchAllAvailableCarsRequestValidatorSpec 4✅ 42ms
CarsInfrastructure.UnitTests.Api.Cars.SearchAllCarsRequestValidatorSpec 1✅ 78ms
CarsInfrastructure.UnitTests.Api.Cars.SearchAllUnavailabilitiesRequestValidatorSpec 1✅ 7ms
CarsInfrastructure.UnitTests.Api.Cars.TakeOfflineCarRequestValidatorSpec 4✅ 170ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_39[1].trx

59 tests were completed in 2s with 59 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Domain.Interfaces.UnitTests.Authorization.MemberFeatureLevelsSpec 1✅ 25ms
Domain.Interfaces.UnitTests.Authorization.MemberRolesSpec 2✅ 24ms
Domain.Interfaces.UnitTests.Authorization.PlatformFeatureLevelsSpec 1✅ 25ms
Domain.Interfaces.UnitTests.Authorization.PlatformRolesSpec 2✅ 1ms
Domain.Interfaces.UnitTests.HydrationPropertiesSpec 13✅ 157ms
Domain.Interfaces.UnitTests.Validations.ValidationsSpec 40✅ 16ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_43.trx

11 tests were completed in 3s with 11 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Application.Common.UnitTests.CallerContextExtensionsSpec 3✅ 94ms
Application.Common.UnitTests.CallerSpec 8✅ 116ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_43[1].trx

219 tests were completed in 3s with 219 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Domain.Common.UnitTests.ChangeEventTypeMigratorSpec 4✅ 163ms
Domain.Common.UnitTests.Entities.AggregateRootBaseSpec 17✅ 149ms
Domain.Common.UnitTests.Entities.DomainEventExtensionsSpec 4✅ 190ms
Domain.Common.UnitTests.Entities.EntityBaseSpec 4✅ 236ms
Domain.Common.UnitTests.Entities.EventSourcedChangeEventExtensionsSpec 1✅ 113ms
Domain.Common.UnitTests.Extensions.HydrationPropertiesExtensionsSpec 6✅ 13ms
Domain.Common.UnitTests.Identity.NamePrefixedIdentifierFactorySpec 11✅ 11ms
Domain.Common.UnitTests.ValueObjects.EventStreamSpec 12✅ 22ms
Domain.Common.UnitTests.ValueObjects.IdentifierExtensionsSpec 4✅ 2ms
Domain.Common.UnitTests.ValueObjects.IdentifierSpec 1✅ 309ms
Domain.Common.UnitTests.ValueObjects.SingleValueObjectComparableSpec 40✅ 6ms
Domain.Common.UnitTests.ValueObjects.SingleValueObjectEqualitySpec 22✅ 21ms
Domain.Common.UnitTests.ValueObjects.SingleValueObjectSpec 2✅ 18ms
Domain.Common.UnitTests.ValueObjects.ValueObjectComparableSpec 23✅ 31ms
Domain.Common.UnitTests.ValueObjects.ValueObjectEqualitySpec 44✅ 27ms
Domain.Common.UnitTests.ValueObjects.ValueObjectExtensionsSpec 2✅ 0ms
Domain.Common.UnitTests.ValueObjects.ValueObjectSpec 22✅ 21ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46.trx

42 tests were completed in 3s with 42 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Web.Hosting.Common.UnitTests.AnonymousCallerContextSpec 2✅ 3ms
Infrastructure.Web.Hosting.Common.UnitTests.ApplicationServices.AspNetHostLocalFileTenantSettingsServiceSpec+GivenEncryptedSettings 1✅ 2ms
Infrastructure.Web.Hosting.Common.UnitTests.ApplicationServices.AspNetHostLocalFileTenantSettingsServiceSpec+GivenNoEncryptedSettings 1✅ 86ms
Infrastructure.Web.Hosting.Common.UnitTests.AspNetCallerContextSpec 18✅ 754ms
Infrastructure.Web.Hosting.Common.UnitTests.Auth.APIKeyAuthenticationHandlerSpec 5✅ 774ms
Infrastructure.Web.Hosting.Common.UnitTests.Auth.HMACAuthenticationHandlerSpec 5✅ 676ms
Infrastructure.Web.Hosting.Common.UnitTests.SubDomainModulesSpec 10✅ 927ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[1].trx

48 tests were completed in 7s with 48 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Tools.Analyzers.Platform.UnitTests.MissingDocsAnalyzerSpec+GivenRuleSas001 34✅ 5s
Tools.Analyzers.Platform.UnitTests.MissingDocsAnalyzerSpec+GivenRuleSas002 14✅ 4s

❌ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx

27 tests were completed in 4s with 19 passed, 8 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass 1✅ 7❌ 1s
Tools.Generators.WebApi.UnitTests.WebApiAssemblyVisitorSpec+GivenAnyClass 10✅ 786ms
Tools.Generators.WebApi.UnitTests.WebApiAssemblyVisitorSpec+GivenAServiceClass 8✅ 1s
Tools.Generators.WebApi.UnitTests.WebApiAssemblyVisitorSpec+GivenAServiceClass+GivenAServiceOperation 1❌ 1s

❌ Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass

❌ WhenDefinesAMethodAndClassConstructor_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System.Threading;
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	using Application.Interfaces;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None));
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        private readonly global::<global namespace>.ICallerContextFactory _contextFactory;
	
	        public AMethod_ARequest_Handler(global::<global namespace>.ICallerContextFactory contextFactory)
	        {
	            this._contextFactory = contextFactory;
	        }
	
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            var api = new global::ANamespace.AServiceClass(this._contextFactory);
	            var result = await api.AMethod(request, cancellationToken);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	
	}
	
	" with a length of 2113, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near ";
	" (index 34).
❌ WhenDefinesAMethodAndHMACAuth_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System.Threading;
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	#if TESTINGONLY
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None))
	                .RequireAuthorization("HMAC");
	#endif
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	#if TESTINGONLY
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            var api = new global::ANamespace.AServiceClass();
	            var result = await api.AMethod(request, cancellationToken);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	#endif
	
	}
	
	" with a length of 1883, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near ";
	" (index 34).
❌ WhenDefinesAMethodAndTestingOnly_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System.Threading;
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	#if TESTINGONLY
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None));
	#endif
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	#if TESTINGONLY
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            var api = new global::ANamespace.AServiceClass();
	            var result = await api.AMethod(request, cancellationToken);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	#endif
	
	}
	
	" with a length of 1836, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near ";
	" (index 34).
❌ WhenDefinesAMethodAndTokenAuth_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System.Threading;
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	#if TESTINGONLY
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None))
	                .RequireAuthorization("Token");
	#endif
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	#if TESTINGONLY
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            var api = new global::ANamespace.AServiceClass();
	            var result = await api.AMethod(request, cancellationToken);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	#endif
	
	}
	
	" with a length of 1884, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near ";
	" (index 34).
❌ WhenDefinesAMethodWithAsyncTaskReturnTypeAndCancellationToken_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System.Threading;
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None));
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            var api = new global::ANamespace.AServiceClass();
	            var result = await api.AMethod(request, cancellationToken);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	
	}
	
	" with a length of 1786, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near ";
	" (index 34).
❌ WhenDefinesAMethodWithAsyncTaskReturnTypeAndNoCancellationToken_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None));
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            var api = new global::ANamespace.AServiceClass();
	            var result = await api.AMethod(request);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	
	}
	
	" with a length of 1742, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near "Com" (index 137).
❌ WhenDefinesAMethodWithNakedReturnType_ThenGenerates
	Expected string to be "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Interfaces;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	            var aserviceclassGroup = app.MapGroup(string.Empty)
	                .WithGroupName("AServiceClass")
	                .RequireCors("__DefaultCorsPolicy")
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
	                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
	            aserviceclassGroup.MapGet("aroute",
	                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
	                     await mediator.Send(request, global::System.Threading.CancellationToken.None));
	
	        }
	    }
	}
	
	namespace ANamespace.AServiceClassMediatRHandlers
	{
	    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
	    {
	        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
	        {
	            await Task.CompletedTask;
	            var api = new global::ANamespace.AServiceClass();
	            var result = api.AMethod(request);
	            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
	        }
	    }
	
	}
	
	" with a length of 1775, but "// <auto-generated/>
	using System;
	using Microsoft.AspNetCore.Http;
	using Microsoft.AspNetCore.Builder;
	using Infrastructure.Web.Api.Common.Extensions;
	
	namespace compilation
	{
	    public static class MinimalApiRegistration
	    {
	        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
	        {
	    
	        }
	    }
	}
	
	" has a length of 385, differs near "Com" (index 137).
✅ WhenDefinesNoMethods_ThenGenerates

❌ Tools.Generators.WebApi.UnitTests.WebApiAssemblyVisitorSpec+GivenAServiceClass+GivenAServiceOperation

❌ WhenVisitNamedTypeAndHasAttribute_ThenCreatesRegistration
	Expected visitor.OperationRegistrations.Count to be 1, but found 0 (difference of -1).

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_47.trx

22 tests were completed in 9s with 22 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Application.Interfaces.UnitTests.GetOptionsExtensionsSpec 6✅ 20ms
Application.Interfaces.UnitTests.SearchOptionsExtensionsSpec 5✅ 23ms
Application.Interfaces.UnitTests.SearchOptionsSpec 11✅ 479ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_49.trx

79 tests were completed in 2s with 79 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CarsDomain.UnitTests.CarRootSpec 34✅ 217ms
CarsDomain.UnitTests.CausedBySpec 4✅ 6ms
CarsDomain.UnitTests.JurisdictionSpec 3✅ 2ms
CarsDomain.UnitTests.LicensePlateSpec 3✅ 2ms
CarsDomain.UnitTests.ManufacturerSpec 3✅ 3ms
CarsDomain.UnitTests.NumberPlateSpec 3✅ 7ms
CarsDomain.UnitTests.TimeSlotSpec 4✅ 60ms
CarsDomain.UnitTests.UnavailabilityEntitySpec 13✅ 94ms
CarsDomain.UnitTests.VehicleManagersSpec 6✅ 77ms
CarsDomain.UnitTests.VehicleOwnerSpec 2✅ 1ms
CarsDomain.UnitTests.YearSpec 4✅ 69ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_50.trx

17 tests were completed in 2s with 17 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CarsApplication.UnitTests.CarsApplicationSpec 17✅ 324ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_51.trx

7 tests were completed in 2s with 7 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
BookingsApplication.UnitTests.BookingsApplicationSpec 7✅ 286ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_52.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_52[1].trx

10 tests were completed in 2s with 10 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
BookingsInfrastructure.UnitTests.Api.Bookings.CancelBookingRequestValidatorSpec 1✅ 114ms
BookingsInfrastructure.UnitTests.Api.Bookings.MakeBookingRequestValidatorSpec 5✅ 164ms
BookingsInfrastructure.UnitTests.Api.Bookings.SearchAllBookingsRequestValidatorSpec 4✅ 148ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_53.trx

135 tests were completed in 4s with 135 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Persistence.Common.UnitTests.BlobStoreSpec 9✅ 23ms
Infrastructure.Persistence.Common.UnitTests.EventSourcingDddCommandStoreSpec 7✅ 94ms
Infrastructure.Persistence.Common.UnitTests.Extensions.DynamicLinqWhereExtensionsSpec 3✅ 3ms
Infrastructure.Persistence.Common.UnitTests.Extensions.EventNotifyingStoreExtensionsSpec 4✅ 29ms
Infrastructure.Persistence.Common.UnitTests.Extensions.EventStoreExtensionsSpec 6✅ 5ms
Infrastructure.Persistence.Common.UnitTests.Extensions.StoreExtensionsSpec 21✅ 454ms
Infrastructure.Persistence.Common.UnitTests.Extensions.TypeExtensionsSpec 15✅ 57ms
Infrastructure.Persistence.Common.UnitTests.MessageQueueStoreSpec 5✅ 305ms
Infrastructure.Persistence.Common.UnitTests.ReadModelProjectionStoreSpec 9✅ 279ms
Infrastructure.Persistence.Common.UnitTests.SnapshottingDddCommandStoreSpec 20✅ 118ms
Infrastructure.Persistence.Common.UnitTests.SnapshottingQueryStoreSpec 12✅ 196ms
Infrastructure.Persistence.Common.UnitTests.SnapshottingStoreSpec 24✅ 385ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_54.trx

22 tests were completed in 6s with 22 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
BookingsDomain.UnitTests.BookingRootSpec 9✅ 322ms
BookingsDomain.UnitTests.LocationSpec 2✅ 138ms
BookingsDomain.UnitTests.TripEntitySpec 8✅ 192ms
BookingsDomain.UnitTests.TripsSpec 3✅ 400ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_55.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_55[1].trx

42 tests were completed in 2s with 42 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Persistence.Interfaces.UnitTests.CommandEntitySpec 20✅ 265ms
Infrastructure.Persistence.Interfaces.UnitTests.PersistedEntityMetadataSpec 12✅ 74ms
Infrastructure.Persistence.Interfaces.UnitTests.QueryEntitySpec 10✅ 193ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_58.trx

8 tests were completed in 2s with 8 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Application.Persistence.Common.UnitTests.QueryAnyExtensionsSpec 8✅ 37ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_58[1].trx

10 tests were completed in 2s with 10 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Common.UnitTests.DomainFactorySpec 9✅ 173ms
Infrastructure.Common.UnitTests.DomainServices.AesEncryptionServiceSpec 1✅ 45ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_58[2].trx

19 tests were completed in 2s with 19 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Eventing.Common.UnitTests.Notifications.EventNotificationNotifierSpec 7✅ 204ms
Infrastructure.Eventing.Common.UnitTests.Projections.ProjectionCheckpointRepositorySpec 4✅ 262ms
Infrastructure.Eventing.Common.UnitTests.Projections.ReadModelProjectorSpec 8✅ 207ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_00.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_00[1].trx

12 tests were completed in 2s with 12 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
AncillaryInfrastructure.UnitTests.Api.Audits.DeliverAuditRequestValidatorSpec 2✅ 116ms
AncillaryInfrastructure.UnitTests.Api.Emails.DeliverEmailRequestValidatorSpec 2✅ 78ms
AncillaryInfrastructure.UnitTests.Api.Recording.RecordMeasureRequestValidatorSpec 3✅ 6ms
AncillaryInfrastructure.UnitTests.Api.Recording.RecordUsageRequestValidatorSpec 3✅ 105ms
AncillaryInfrastructure.UnitTests.Api.Usages.DeliverUsageRequestValidatorSpec 2✅ 75ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_00[2].trx

70 tests were completed in 2s with 70 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Domain.Shared.UnitTests.EmailAddressSpec 10✅ 32ms
Domain.Shared.UnitTests.FeatureLevelSpec 4✅ 6ms
Domain.Shared.UnitTests.FeatureLevelsSpec 22✅ 53ms
Domain.Shared.UnitTests.NameSpec 2✅ 25ms
Domain.Shared.UnitTests.PersonDisplayNameSpec 2✅ 1ms
Domain.Shared.UnitTests.PersonNameSpec 4✅ 27ms
Domain.Shared.UnitTests.RoleSpec 4✅ 1ms
Domain.Shared.UnitTests.RolesSpec 22✅ 14ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_02.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_03.trx

2 tests were completed in 2s with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
AncillaryDomain.UnitTests.AuditRootSpec 1✅ 131ms
AncillaryDomain.UnitTests.TemplateArgumentsSpec 1✅ 37ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_03[1].trx

20 tests were completed in 5s with 20 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
AncillaryApplication.UnitTests.AncillaryApplicationSpec 20✅ 857ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_05.trx

150 tests were completed in 10s with 150 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas040 3✅ 5s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas041 4✅ 4s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas042 2✅ 6s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas043 2✅ 4s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas044 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas045 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnEntity+GivenRuleSas046 4✅ 4s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAnyRule 4✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas030 3✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas031 4✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas032 2✅ 2s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas033 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas034 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas035 2✅ 6s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas036 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenARootAggregate+GivenRuleSas037 4✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAValueObject+GivenRuleSas050 3✅ 6s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAValueObject+GivenRuleSas051 4✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAValueObject+GivenRuleSas052 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAValueObject+GivenRuleSas053 2✅ 6s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAValueObject+GivenRuleSas054 4✅ 4s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignAnalyzerSpec+GivenAValueObject+GivenRuleSas055 6✅ 6s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenAnEntity+GivenRuleSas040 1✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenAnEntity+GivenRuleSas043 1✅ 5s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenAnEntity+GivenRuleSas045 1✅ 4s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenARootAggregate+GivenRuleSas030 1✅ 6s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenARootAggregate+GivenRuleSas034 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenARootAggregate+GivenRuleSas035 1✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenARootAggregate+GivenRuleSas036 1✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenAValueObject+GivenRuleSas050 2✅ 3s
Tools.Analyzers.Subdomain.UnitTests.DomainDrivenDesignCodeFixSpec+GivenAValueObject+GivenRuleSas053 2✅ 6s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenAnyRule 5✅ 3s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenRuleSas010 18✅ 7s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenRuleSas011AndSas012 6✅ 3s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenRuleSas013 3✅ 6s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenRuleSas014 4✅ 3s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenRuleSas015 2✅ 6s
Tools.Analyzers.Subdomain.UnitTests.WebApiClassAnalyzerSpec+GivenRuleSas016 35✅ 5s

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_06.trx

17 tests were completed in 3s with 17 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Web.Common.UnitTests.Extensions.ResponseProblemExtensionsSpec 17✅ 80ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_06[1].trx

45 tests were completed in 3s with 45 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Hosting.Common.UnitTests.ApplicationServices.AspNetConfigurationSettingsSpec+GivenOnlyPlatformConfiguration 10✅ 74ms
Infrastructure.Hosting.Common.UnitTests.ApplicationServices.AspNetConfigurationSettingsSpec+GivenTenancyConfiguration 10✅ 159ms
Infrastructure.Hosting.Common.UnitTests.ApplicationServices.Eventing.EventHandlerBaseSpec 4✅ 321ms
Infrastructure.Hosting.Common.UnitTests.ApplicationServices.Eventing.Notifications.InProcessSynchronousNotificationRelaySpec 2✅ 82ms
Infrastructure.Hosting.Common.UnitTests.ApplicationServices.Eventing.Projections.InProcessSynchronousProjectionRelaySpec 2✅ 161ms
Infrastructure.Hosting.Common.UnitTests.ApplicationServices.HostSettingsSpec 3✅ 23ms
Infrastructure.Hosting.Common.UnitTests.Extensions.ServiceCollectionExtensionsSpec 7✅ 69ms
Infrastructure.Hosting.Common.UnitTests.Recording.HostRecorderSpec 7✅ 176ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_09.trx

14 tests were completed in 2s with 14 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Web.Website.UnitTests.Api.Recording.RecordCrashRequestValidatorSpec 2✅ 84ms
Infrastructure.Web.Website.UnitTests.Api.Recording.RecordMeasureRequestValidatorSpec 3✅ 91ms
Infrastructure.Web.Website.UnitTests.Api.Recording.RecordPageViewRequestValidatorSpec 2✅ 84ms
Infrastructure.Web.Website.UnitTests.Api.Recording.RecordTraceRequestValidatorSpec 4✅ 20ms
Infrastructure.Web.Website.UnitTests.Api.Recording.RecordUsageRequestValidatorSpec 3✅ 90ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_09[1].trx

37 tests were completed in 4s with 37 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
IdentityInfrastructure.UnitTests.Api.MachineCredentials.RegisterMachineRequestValidatorSpec 6✅ 137ms
IdentityInfrastructure.UnitTests.Api.PasswordCredentials.AuthenticatePasswordRequestValidatorSpec 4✅ 103ms
IdentityInfrastructure.UnitTests.Api.PasswordCredentials.ConfirmPersonRegistrationRequestValidatorSpec 3✅ 8ms
IdentityInfrastructure.UnitTests.Api.PasswordCredentials.RegisterPersonRequestValidatorSpec 13✅ 154ms
IdentityInfrastructure.UnitTests.ApplicationServices.JWTTokensServiceSpec 1✅ 177ms
IdentityInfrastructure.UnitTests.DomainServices.EmailAddressServiceSpec 3✅ 211ms
IdentityInfrastructure.UnitTests.DomainServices.PasswordHasherServiceSpec 7✅ 2s

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_10.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_11.trx

No tests found

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_13.trx

92 tests were completed in 15s with 92 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
IdentityDomain.UnitTests.APIKeyKeepSpec 11✅ 239ms
IdentityDomain.UnitTests.APIKeyRootSpec 9✅ 43ms
IdentityDomain.UnitTests.AuthTokensRootSpec 7✅ 164ms
IdentityDomain.UnitTests.LoginMonitorSpec 14✅ 14s
IdentityDomain.UnitTests.PasswordCredentialRootSpec 25✅ 125ms
IdentityDomain.UnitTests.PasswordKeepSpec 23✅ 195ms
IdentityDomain.UnitTests.VerificationSpec 3✅ 37ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_14.trx

6 tests were completed in 2s with 6 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Infrastructure.Shared.UnitTests.ApplicationServices.TokensServiceSpec 6✅ 35ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_14[1].trx

2 tests were completed in 2s with 2 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
EndUsersDomain.UnitTests.EndUserRootSpec 2✅ 153ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_15.trx

23 tests were completed in 3s with 23 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
IdentityApplication.UnitTests.APIKeysApplicationSpec 6✅ 197ms
IdentityApplication.UnitTests.AuthTokensApplicationSpec 4✅ 192ms
IdentityApplication.UnitTests.MachineCredentialsApplicationSpec 1✅ 130ms
IdentityApplication.UnitTests.PasswordCredentialsApplicationSpec 12✅ 275ms

✅ src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_12_16.trx

4 tests were completed in 1s with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
EndUsersApplication.UnitTests.EndUsersApplicationSpec 4✅ 242ms

Annotations

Check failure on line 588 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodAndClassConstructor_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System.Threading;
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  using Application.Interfaces;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None));
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          private readonly global::<global namespace>.ICallerContextFactory _contextFactory;
  
          public AMethod_ARequest_Handler(global::<global namespace>.ICallerContextFactory contextFactory)
          {
              this._contextFactory = contextFactory;
          }
  
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              var api = new global::ANamespace.AServiceClass(this._contextFactory);
              var result = await api.AMethod(request, cancellationToken);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  
  }
  
  " with a length of 2113, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near ";
  " (index 34).
Raw output
Expected string to be "// <auto-generated/>
using System.Threading;
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;
using Application.Interfaces;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None));

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        private readonly global::<global namespace>.ICallerContextFactory _contextFactory;

        public AMethod_ARequest_Handler(global::<global namespace>.ICallerContextFactory contextFactory)
        {
            this._contextFactory = contextFactory;
        }

        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            var api = new global::ANamespace.AServiceClass(this._contextFactory);
            var result = await api.AMethod(request, cancellationToken);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }

}

" with a length of 2113, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near ";
" (index 34).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodAndClassConstructor_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 588
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 419 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodAndHMACAuth_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System.Threading;
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
  #if TESTINGONLY
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None))
                  .RequireAuthorization("HMAC");
  #endif
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
  #if TESTINGONLY
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              var api = new global::ANamespace.AServiceClass();
              var result = await api.AMethod(request, cancellationToken);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  #endif
  
  }
  
  " with a length of 1883, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near ";
  " (index 34).
Raw output
Expected string to be "// <auto-generated/>
using System.Threading;
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
#if TESTINGONLY
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None))
                .RequireAuthorization("HMAC");
#endif

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
#if TESTINGONLY
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            var api = new global::ANamespace.AServiceClass();
            var result = await api.AMethod(request, cancellationToken);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }
#endif

}

" with a length of 1883, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near ";
" (index 34).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodAndHMACAuth_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 419
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 340 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodAndTestingOnly_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System.Threading;
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
  #if TESTINGONLY
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None));
  #endif
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
  #if TESTINGONLY
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              var api = new global::ANamespace.AServiceClass();
              var result = await api.AMethod(request, cancellationToken);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  #endif
  
  }
  
  " with a length of 1836, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near ";
  " (index 34).
Raw output
Expected string to be "// <auto-generated/>
using System.Threading;
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
#if TESTINGONLY
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None));
#endif

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
#if TESTINGONLY
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            var api = new global::ANamespace.AServiceClass();
            var result = await api.AMethod(request, cancellationToken);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }
#endif

}

" with a length of 1836, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near ";
" (index 34).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodAndTestingOnly_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 340
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 499 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodAndTokenAuth_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System.Threading;
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
  #if TESTINGONLY
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None))
                  .RequireAuthorization("Token");
  #endif
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
  #if TESTINGONLY
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              var api = new global::ANamespace.AServiceClass();
              var result = await api.AMethod(request, cancellationToken);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  #endif
  
  }
  
  " with a length of 1884, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near ";
  " (index 34).
Raw output
Expected string to be "// <auto-generated/>
using System.Threading;
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
#if TESTINGONLY
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None))
                .RequireAuthorization("Token");
#endif

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
#if TESTINGONLY
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            var api = new global::ANamespace.AServiceClass();
            var result = await api.AMethod(request, cancellationToken);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }
#endif

}

" with a length of 1884, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near ";
" (index 34).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodAndTokenAuth_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 499
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 265 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodWithAsyncTaskReturnTypeAndCancellationToken_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System.Threading;
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None));
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              var api = new global::ANamespace.AServiceClass();
              var result = await api.AMethod(request, cancellationToken);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  
  }
  
  " with a length of 1786, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near ";
  " (index 34).
Raw output
Expected string to be "// <auto-generated/>
using System.Threading;
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None));

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            var api = new global::ANamespace.AServiceClass();
            var result = await api.AMethod(request, cancellationToken);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }

}

" with a length of 1786, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near ";
" (index 34).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodWithAsyncTaskReturnTypeAndCancellationToken_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 265
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 191 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodWithAsyncTaskReturnTypeAndNoCancellationToken_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None));
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              var api = new global::ANamespace.AServiceClass();
              var result = await api.AMethod(request);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  
  }
  
  " with a length of 1742, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near "Com" (index 137).
Raw output
Expected string to be "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None));

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            var api = new global::ANamespace.AServiceClass();
            var result = await api.AMethod(request);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }

}

" with a length of 1742, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near "Com" (index 137).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodWithAsyncTaskReturnTypeAndNoCancellationToken_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 191
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 117 in src/Tools.Generators.WebApi.UnitTests/MinimalApiMediatRGeneratorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec+GivenAServiceCLass ► WhenDefinesAMethodWithNakedReturnType_ThenGenerates

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected string to be "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Interfaces;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
              var aserviceclassGroup = app.MapGroup(string.Empty)
                  .WithGroupName("AServiceClass")
                  .RequireCors("__DefaultCorsPolicy")
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                  .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
              aserviceclassGroup.MapGet("aroute",
                  async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                       await mediator.Send(request, global::System.Threading.CancellationToken.None));
  
          }
      }
  }
  
  namespace ANamespace.AServiceClassMediatRHandlers
  {
      public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
      {
          public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
          {
              await Task.CompletedTask;
              var api = new global::ANamespace.AServiceClass();
              var result = api.AMethod(request);
              return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
          }
      }
  
  }
  
  " with a length of 1775, but "// <auto-generated/>
  using System;
  using Microsoft.AspNetCore.Http;
  using Microsoft.AspNetCore.Builder;
  using Infrastructure.Web.Api.Common.Extensions;
  
  namespace compilation
  {
      public static class MinimalApiRegistration
      {
          public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
          {
      
          }
      }
  }
  
  " has a length of 385, differs near "Com" (index 137).
Raw output
Expected string to be "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Interfaces;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
            var aserviceclassGroup = app.MapGroup(string.Empty)
                .WithGroupName("AServiceClass")
                .RequireCors("__DefaultCorsPolicy")
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.RequestCorrelationFilter>()
                .AddEndpointFilter<global::Infrastructure.Web.Api.Common.ContentNegotiationFilter>();
            aserviceclassGroup.MapGet("aroute",
                async (global::MediatR.IMediator mediator, [global::Microsoft.AspNetCore.Http.AsParameters] global::ANamespace.ARequest request) =>
                     await mediator.Send(request, global::System.Threading.CancellationToken.None));

        }
    }
}

namespace ANamespace.AServiceClassMediatRHandlers
{
    public class AMethod_ARequest_Handler : global::MediatR.IRequestHandler<global::ANamespace.ARequest, global::Microsoft.AspNetCore.Http.IResult>
    {
        public async Task<global::Microsoft.AspNetCore.Http.IResult> Handle(global::ANamespace.ARequest request, global::System.Threading.CancellationToken cancellationToken)
        {
            await Task.CompletedTask;
            var api = new global::ANamespace.AServiceClass();
            var result = api.AMethod(request);
            return result.HandleApiResult(global::Infrastructure.Web.Api.Interfaces.ServiceOperation.Get);
        }
    }

}

" with a length of 1775, but "// <auto-generated/>
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Builder;
using Infrastructure.Web.Api.Common.Extensions;

namespace compilation
{
    public static class MinimalApiRegistration
    {
        public static void RegisterRoutes(this global::Microsoft.AspNetCore.Builder.WebApplication app)
        {
    
        }
    }
}

" has a length of 385, differs near "Com" (index 137).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.MinimalApiMediatRGeneratorSpec.GivenAServiceCLass.WhenDefinesAMethodWithNakedReturnType_ThenGenerates() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\MinimalApiMediatRGeneratorSpec.cs:line 117
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Check failure on line 392 in src/Tools.Generators.WebApi.UnitTests/WebApiAssemblyVisitorSpec.cs

See this annotation in the file changed.

@github-actions github-actions / All Tests

Tools.Generators.WebApi.UnitTests.WebApiAssemblyVisitorSpec+GivenAServiceClass+GivenAServiceOperation ► WhenVisitNamedTypeAndHasAttribute_ThenCreatesRegistration

Failed test found in:
  src/TestResults/csharp/runneradmin_fv-az742-58_2024-01-12_22_11_46[2].trx
Error:
  Expected visitor.OperationRegistrations.Count to be 1, but found 0 (difference of -1).
Raw output
Expected visitor.OperationRegistrations.Count to be 1, but found 0 (difference of -1).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
   at FluentAssertions.Numeric.NumericAssertions`2.Be(T expected, String because, Object[] becauseArgs)
   at Tools.Generators.WebApi.UnitTests.WebApiAssemblyVisitorSpec.GivenAServiceClass.GivenAServiceOperation.WhenVisitNamedTypeAndHasAttribute_ThenCreatesRegistration() in D:\a\saastack\saastack\src\Tools.Generators.WebApi.UnitTests\WebApiAssemblyVisitorSpec.cs:line 392
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)