From 54edf0bebc841a2ea8eb8d437ab411017a1a1cc6 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Thu, 18 Jul 2024 18:06:04 +0200 Subject: [PATCH] Add link to TIOBE Index on main page + fix issues (#1137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add TIOBE + include SonarAnalyzer.CSharp * . * cp * Copyright © WireMock.Net * more fixes * fix * xpath * if (Matchers == null || !Matchers.Any()) * if (Matchers != null) * ? * . * . --- .editorconfig | 6 ++- Directory.Build.props | 2 +- README.md | 1 + WireMock.Net Solution.sln | 3 ++ WireMock.Net Solution.sln.DotSettings | 1 + .../WireMock.Net.Client.Net472/Program.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Program.cs | 2 + .../Program.cs | 2 + .../Program.cs | 2 + .../__admin/mappings/1.cs | 2 + .../Program.cs | 2 + .../__admin/mappings/1.cs | 2 + .../Program.cs | 2 + .../CustomFileSystemFileHandler.cs | 2 + .../MainApp.cs | 2 + .../Program.cs | 2 + .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Program.cs | 2 + .../Program.cs | 2 + .../Properties/AssemblyInfo.cs | 4 +- .../Program.cs | 4 +- .../DynamicDataGeneration.cs | 2 + .../Program.cs | 2 + .../Run.cs | 2 + .../Installer.Designer.cs | 4 +- examples/WireMock.Net.Service/Installer.cs | 4 +- examples/WireMock.Net.Service/Program.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../WireMockLog4NetLogger.cs | 4 +- .../Program.cs | 2 + .../WireMock.Net.WebApplication.NET6/App.cs | 2 + .../IWireMockService.cs | 2 + .../Program.cs | 2 + .../WireMockService.cs | 2 + .../App.cs | 4 +- .../IWireMockService.cs | 4 +- .../Program.cs | 4 +- .../WireMockService.cs | 4 +- .../WireMockAzureQueueExample/Function1.cs | 2 + examples/WireMockAzureQueueProxy/Program.cs | 2 + hdr.ps1 | 23 +++++++++++ src/Directory.Build.props | 15 +++++++ .../Admin/Mappings/BodyModel.cs | 2 + .../Admin/Mappings/ClientIPModel.cs | 2 + .../Admin/Mappings/CookieModel.cs | 2 + .../Admin/Mappings/EncodingModel.cs | 4 +- .../Admin/Mappings/FaultModel.cs | 2 + .../Admin/Mappings/HeaderModel.cs | 2 + .../Admin/Mappings/MappingModel.cs | 2 + .../Admin/Mappings/MatcherModel.cs | 2 + .../Admin/Mappings/ParamModel.cs | 2 + .../Admin/Mappings/PathModel.cs | 2 + .../Admin/Mappings/RequestModel.cs | 2 + .../Admin/Mappings/ResponseModel.cs | 2 + .../Admin/Mappings/StatusModel.cs | 2 + .../Admin/Mappings/TimeSettingsModel.cs | 2 + .../Admin/Mappings/UrlModel.cs | 2 + .../Admin/Mappings/WebProxyModel.cs | 2 + .../Admin/Mappings/WebhookModel.cs | 2 + .../Admin/Mappings/WebhookRequestModel.cs | 2 + .../Admin/Mappings/XmlNamespace.cs | 2 + .../Admin/Requests/LogEntryModel.cs | 2 + .../Admin/Requests/LogRequestMatchModel.cs | 2 + .../Admin/Requests/LogRequestModel.cs | 2 + .../Admin/Requests/LogResponseModel.cs | 2 + .../Admin/Scenarios/ScenarioStateModel.cs | 2 + .../Settings/ProxyAndRecordSettingsModel.cs | 2 + .../Settings/ProxyUrlReplaceSettingsModel.cs | 2 + .../Admin/Settings/SettingsModel.cs | 2 + .../Admin/Settings/WebProxySettings.cs | 2 + .../BuilderExtensions/BodyModelBuilder.cs | 2 + .../BuilderExtensions/RequestModelBuilder.cs | 2 + .../BuilderExtensions/ResponseModelBuilder.cs | 2 + .../Constants/HttpRequestMethod.cs | 2 + .../Extensions/RequestModelExtensions.cs | 2 + .../Extensions/ResponseModelExtensions.cs | 2 + .../Handlers/IFileSystemHandler.cs | 2 + .../IRequestMessage.cs | 2 + .../IResponseMessage.cs | 2 + .../Logging/ILogEntry.cs | 2 + .../Logging/IWireMockLogger.cs | 2 + .../Matchers/Request/IRequestMatchResult.cs | 2 + .../Matchers/Request/IRequestMatcher.cs | 2 + .../Matchers/Request/MatchDetail.cs | 2 + .../Models/IBodyData.cs | 2 + .../Models/ITimeSettings.cs | 2 + .../Models/IWebhook.cs | 2 + .../Models/IWebhookRequest.cs | 2 + .../Models/IdOrText.cs | 2 + .../ResponseBuilders/FaultType.cs | 2 + .../Server/IWireMockServer.cs | 2 + .../Types/BodyType.cs | 2 + .../Types/ClientCertificateMode.cs | 2 + .../Types/CorsPolicyOptions.cs | 2 + .../Types/HostingScheme.cs | 2 + .../Types/MappingConverterType.cs | 2 + .../QueryParameterMultipleValueSupport.cs | 2 + .../Types/ReplaceNodeOptions.cs | 2 + .../Types/TransformerType.cs | 2 + .../Types/WireMockList.cs | 2 + .../WireMock.Net.Abstractions.csproj | 3 -- .../WireMockANumberOfCallsAssertions.cs | 2 + .../Assertions/WireMockAssertions.AtUrl.cs | 2 + .../WireMockAssertions.FromClientIP.cs | 2 + .../WireMockAssertions.UsingMethod.cs | 2 + .../Assertions/WireMockAssertions.WithBody.cs | 28 +++++++------ .../WireMockAssertions.WithHeader.cs | 8 ++-- .../WireMockAssertions.WithProxy.cs | 2 + .../Assertions/WireMockAssertions.cs | 2 + .../Assertions/WireMockReceivedAssertions.cs | 2 + .../Extensions/WireMockExtensions.cs | 2 + src/WireMock.Net.FluentAssertions/Usings.cs | 2 + .../WireMock.Net.FluentAssertions.csproj | 6 --- .../Matchers/CSharpCodeMatcher.cs | 40 ++++++++++--------- .../Properties/AssemblyInfo.cs | 4 +- .../WireMock.Net.Matchers.CSharpCode.csproj | 3 -- .../Extensions/DictionaryExtensions.cs | 2 + .../Extensions/OpenApiSchemaExtensions.cs | 2 + .../Extensions/WireMockServerExtensions.cs | 2 + .../IWireMockOpenApiParser.cs | 2 + .../Mappers/OpenApiPathsMapper.cs | 2 + .../IWireMockOpenApiParserExampleValues.cs | 2 + ...reMockOpenApiParserDynamicExampleValues.cs | 2 + .../WireMockOpenApiParserExampleValues.cs | 2 + .../Settings/WireMockOpenApiParserSettings.cs | 2 + .../Types/ExampleValueType.cs | 2 + .../Types/SchemaFormat.cs | 2 + .../Types/SchemaType.cs | 2 + .../Utils/DateTimeUtils.cs | 2 + .../Utils/ExampleValueGenerator.cs | 2 + .../WireMock.Net.OpenApiParser.csproj | 3 -- .../WireMockOpenApiParser.cs | 2 + .../Builders/ApiMappingModelBuilder.cs | 2 + .../ResponseModelBuilderExtensions.cs | 2 + .../Extensions/WireMockAdminApiExtensions.cs | 2 + .../IWireMockAdminApi.cs | 2 + .../WireMock.Net.RestClient.csproj | 1 - .../Properties/AssemblyInfo.cs | 4 +- src/WireMock.Net.StandAlone/StandAloneApp.cs | 2 + .../WireMock.Net.StandAlone.csproj | 5 --- .../Models/ContainerInfo.cs | 2 + .../WireMock.Net.Testcontainers.csproj | 2 - .../WireMockConfiguration.cs | 2 + .../WireMockContainer.cs | 2 + .../WireMockContainerBuilder.cs | 2 + .../TestOutputHelperWireMockLogger.cs | 2 + .../WireMock.Net.xUnit.csproj | 1 - .../AzureADAuthenticationMatcher.cs | 2 + .../BasicAuthenticationMatcher.cs | 2 + src/WireMock.Net/Compatibility/EmptyArray.cs | 2 + .../Compatibility/StringExtensions.cs | 2 + src/WireMock.Net/Compatibility/WebProxy.cs | 2 + .../Constants/WireMockConstants.cs | 2 + .../Exceptions/WireMockException.cs | 2 + .../Extensions/AnyOfExtensions.cs | 2 + .../Extensions/DictionaryExtensions.cs | 2 + src/WireMock.Net/Extensions/EnumExtensions.cs | 2 + .../Extensions/ExceptionExtensions.cs | 2 + .../Extensions/TimeSettingsExtensions.cs | 2 + .../Handlers/LocalFileSystemHandler.cs | 8 ++-- .../Http/ByteArrayContentHelper.cs | 2 + src/WireMock.Net/Http/HttpClientBuilder.cs | 2 + src/WireMock.Net/Http/HttpClientFactory2.cs | 2 + src/WireMock.Net/Http/HttpKnownHeaderNames.cs | 2 + .../Http/HttpRequestMessageHelper.cs | 2 + .../Http/HttpResponseMessageHelper.cs | 2 + src/WireMock.Net/Http/StringContentHelper.cs | 2 + src/WireMock.Net/Http/WebhookSender.cs | 2 + .../HttpsCertificate/CertificateLoader.cs | 2 + .../PublicCertificateHelper.cs | 2 + src/WireMock.Net/IMapping.cs | 2 + src/WireMock.Net/IMappingBuilder.cs | 2 + .../Json/DynamicJsonClassOptions.cs | 2 + .../Json/DynamicPropertyWithValue.cs | 2 + src/WireMock.Net/Json/FloatBehavior.cs | 2 + src/WireMock.Net/Json/IntegerBehavior.cs | 2 + src/WireMock.Net/Json/JObjectExtensions.cs | 2 + src/WireMock.Net/Logging/LogEntry.cs | 2 + .../Logging/WireMockConsoleLogger.cs | 7 +++- .../Logging/WireMockNullLogger.cs | 2 + src/WireMock.Net/Mapping.cs | 2 + src/WireMock.Net/MappingBuilder.cs | 2 + .../MappingRegistrationCallback.cs | 4 +- .../Matchers/AbstractJsonPartialMatcher.cs | 2 + .../Matchers/ContentTypeMatcher.cs | 2 + src/WireMock.Net/Matchers/ExactMatcher.cs | 2 + .../Matchers/ExactObjectMatcher.cs | 2 + src/WireMock.Net/Matchers/GraphQLMatcher.cs | 2 + .../Helpers/BodyDataMatchScoreCalculator.cs | 27 +++++++------ src/WireMock.Net/Matchers/IBytesMatcher.cs | 2 + .../Matchers/ICSharpCodeMatcher.cs | 2 + src/WireMock.Net/Matchers/IDecodeMatcher.cs | 2 + .../Matchers/IIgnoreCaseMatcher.cs | 2 + src/WireMock.Net/Matchers/IJsonMatcher.cs | 2 + src/WireMock.Net/Matchers/IMatcher.cs | 2 + src/WireMock.Net/Matchers/IObjectMatcher.cs | 2 + src/WireMock.Net/Matchers/IProtoBufMatcher.cs | 2 + src/WireMock.Net/Matchers/IStringMatcher.cs | 2 + src/WireMock.Net/Matchers/JSONPathMatcher.cs | 2 + src/WireMock.Net/Matchers/JmesPathMatcher.cs | 2 + src/WireMock.Net/Matchers/JsonMatcher.cs | 2 + .../Matchers/JsonPartialMatcher.cs | 2 + .../Matchers/JsonPartialWildCardMatcher.cs | 2 + src/WireMock.Net/Matchers/LinqMatcher.cs | 2 + src/WireMock.Net/Matchers/MatchBehaviour.cs | 2 + .../Matchers/MatchBehaviourHelper.cs | 2 + src/WireMock.Net/Matchers/MatchOperator.cs | 2 + src/WireMock.Net/Matchers/MatchResult.cs | 2 + src/WireMock.Net/Matchers/MatchScores.cs | 2 + src/WireMock.Net/Matchers/MimePartMatcher.cs | 2 + .../Models/WireMockCustomScalarGraphType.cs | 2 + .../Matchers/NotNullOrEmptyMatcher.cs | 2 + src/WireMock.Net/Matchers/ProtoBufMatcher.cs | 2 + src/WireMock.Net/Matchers/RegexMatcher.cs | 2 + .../Matchers/Request/CompositeMatcherType.cs | 2 + .../Matchers/Request/RequestMatchResult.cs | 2 + .../Request/RequestMessageBodyMatcher.cs | 2 + .../Request/RequestMessageClientIPMatcher.cs | 2 + .../Request/RequestMessageCompositeMatcher.cs | 2 + .../Request/RequestMessageCookieMatcher.cs | 2 + .../Request/RequestMessageGraphQLMatcher.cs | 5 ++- .../Request/RequestMessageHeaderMatcher.cs | 2 + .../RequestMessageHttpVersionMatcher.cs | 2 + .../Request/RequestMessageMethodMatcher.cs | 2 + .../Request/RequestMessageMultiPartMatcher.cs | 2 + .../Request/RequestMessageParamMatcher.cs | 11 ++--- .../Request/RequestMessagePathMatcher.cs | 2 + .../Request/RequestMessageProtoBufMatcher.cs | 2 + .../RequestMessageScenarioAndStateMatcher.cs | 2 + .../Request/RequestMessageUrlMatcher.cs | 2 + .../Matchers/SimMetricsMatcher.cs | 2 + src/WireMock.Net/Matchers/WildcardMatcher.cs | 2 + src/WireMock.Net/Matchers/XPathMatcher.cs | 36 ++++++++++++----- src/WireMock.Net/Models/BodyData.cs | 2 + .../Models/GraphQLSchemaDetails.cs | 2 + src/WireMock.Net/Models/StringPattern.cs | 2 + src/WireMock.Net/Models/TimeSettings.cs | 2 + src/WireMock.Net/Models/UrlDetails.cs | 2 + src/WireMock.Net/Models/Webhook.cs | 2 + src/WireMock.Net/Models/WebhookRequest.cs | 2 + .../Owin/AspNetCoreSelfHost.NETCore.cs | 2 + .../Owin/AspNetCoreSelfHost.NETStandard.cs | 2 + .../Owin/AspNetCoreSelfHost.NETStandard13.cs | 2 + src/WireMock.Net/Owin/AspNetCoreSelfHost.cs | 2 + .../Owin/GlobalExceptionMiddleware.cs | 16 +++----- src/WireMock.Net/Owin/HostUrlDetails.cs | 2 + src/WireMock.Net/Owin/HostUrlOptions.cs | 2 + src/WireMock.Net/Owin/IMappingMatcher.cs | 2 + src/WireMock.Net/Owin/IOwinSelfHost.cs | 2 + .../Owin/IWireMockMiddlewareOptions.cs | 2 + .../Owin/Mappers/IOwinRequestMapper.cs | 4 +- .../Owin/Mappers/IOwinResponseMapper.cs | 2 + .../Owin/Mappers/OwinRequestMapper.cs | 2 + .../Owin/Mappers/OwinResponseMapper.cs | 2 + src/WireMock.Net/Owin/MappingMatcher.cs | 2 + src/WireMock.Net/Owin/MappingMatcherResult.cs | 2 + src/WireMock.Net/Owin/OwinSelfHost.cs | 7 ++-- src/WireMock.Net/Owin/WireMockMiddleware.cs | 2 + .../Owin/WireMockMiddlewareOptions.cs | 6 ++- .../Owin/WireMockMiddlewareOptionsHelper.cs | 2 + .../Pact/Models/V2/Interaction.cs | 2 + .../Pact/Models/V2/MatchingRule.cs | 2 + src/WireMock.Net/Pact/Models/V2/Metadata.cs | 2 + src/WireMock.Net/Pact/Models/V2/Pact.cs | 2 + .../Pact/Models/V2/PactRequest.cs | 2 + .../Pact/Models/V2/PactResponse.cs | 2 + src/WireMock.Net/Pact/Models/V2/PactRust.cs | 2 + .../Pact/Models/V2/PactSpecification.cs | 2 + .../Pact/Models/V2/Pacticipant.cs | 2 + .../Pact/Models/V2/ProviderState.cs | 2 + src/WireMock.Net/Properties/AssemblyInfo.cs | 2 + src/WireMock.Net/Proxy/ProxyHelper.cs | 4 +- .../RegularExpressions/RegexExtended.cs | 6 ++- .../RequestBuilders/IBodyRequestBuilder.cs | 2 + .../IClientIPRequestBuilder.cs | 2 + .../RequestBuilders/ICookiesRequestBuilder.cs | 2 + .../RequestBuilders/IGraphQLRequestBuilder.cs | 2 + .../RequestBuilders/IHeadersRequestBuilder.cs | 2 + .../RequestBuilders/IHttpVersionBuilder.cs | 2 + .../RequestBuilders/IMethodRequestBuilder.cs | 2 + .../IMultiPartRequestBuilder.cs | 2 + .../RequestBuilders/IParamsRequestBuilder.cs | 2 + .../IProtoBufRequestBuilder.cs | 2 + .../RequestBuilders/IRequestBuilder.cs | 2 + .../IUrlAndPathRequestBuilder.cs | 2 + .../RequestBuilders/Request.ClientIP.cs | 2 + .../RequestBuilders/Request.UsingMethods.cs | 2 + .../RequestBuilders/Request.WithBody.cs | 2 + .../Request.WithBodyAsProtoBuf.cs | 2 + .../RequestBuilders/Request.WithCookies.cs | 24 ++++++----- .../Request.WithGraphQLSchema.cs | 2 + .../RequestBuilders/Request.WithHeaders.cs | 2 + .../Request.WithHttpVersion.cs | 2 + .../RequestBuilders/Request.WithMultiPart.cs | 2 + .../RequestBuilders/Request.WithParam.cs | 4 +- .../RequestBuilders/Request.WithPath.cs | 2 + .../RequestBuilders/Request.WithUrl.cs | 2 + src/WireMock.Net/RequestBuilders/Request.cs | 2 + src/WireMock.Net/RequestMessage.cs | 2 + .../ResponseBuilders/BodyDestinationFormat.cs | 2 + .../ResponseBuilders/IBodyResponseBuilder.cs | 2 + .../ICallbackResponseBuilder.cs | 2 + .../ResponseBuilders/IDelayResponseBuilder.cs | 2 + .../ResponseBuilders/IFaultRequestBuilder.cs | 2 + .../IHeadersResponseBuilder.cs | 2 + .../ResponseBuilders/IProxyResponseBuilder.cs | 2 + .../ResponseBuilders/IResponseBuilder.cs | 2 + .../IStatusCodeResponseBuilder.cs | 2 + .../ITransformResponseBuilder.cs | 2 + .../ResponseBuilders/Response.WithBody.cs | 2 + .../ResponseBuilders/Response.WithCallback.cs | 2 + .../ResponseBuilders/Response.WithFault.cs | 2 + .../ResponseBuilders/Response.WithHeaders.cs | 2 + .../ResponseBuilders/Response.WithProxy.cs | 2 + src/WireMock.Net/ResponseBuilders/Response.cs | 2 + src/WireMock.Net/ResponseMessage.cs | 2 + src/WireMock.Net/ResponseMessageBuilder.cs | 2 + .../DynamicAsyncResponseProvider.cs | 2 + .../DynamicResponseProvider.cs | 2 + .../ResponseProviders/IResponseProvider.cs | 2 + .../ProxyAsyncResponseProvider.cs | 2 + src/WireMock.Net/ScenarioState.cs | 2 + .../JsonSerializationConstants.cs | 2 + .../Serialization/LogEntryMapper.cs | 2 + .../Serialization/MappingConverter.cs | 2 + .../Serialization/MappingConverterSettings.cs | 2 + .../Serialization/MappingFileNameSanitizer.cs | 2 + .../Serialization/MappingToFileSaver.cs | 2 + .../Serialization/MatcherMapper.cs | 2 + src/WireMock.Net/Serialization/PactMapper.cs | 2 + .../Serialization/ProxyMappingConverter.cs | 2 + .../Serialization/SwaggerMapper.cs | 2 + .../Serialization/TimeSettingsMapper.cs | 2 + .../Serialization/WebhookMapper.cs | 2 + .../Server/IRespondWithAProvider.cs | 2 + .../Server/RespondWithAProvider.cs | 2 + .../Server/WireMockServer.Admin.cs | 2 + .../Server/WireMockServer.AdminFiles.cs | 2 + .../Server/WireMockServer.ConvertMapping.cs | 6 ++- .../WireMockServer.ImportWireMockOrg.cs | 4 +- .../Server/WireMockServer.LogEntries.cs | 2 + .../Server/WireMockServer.OpenApiParser.cs | 2 + .../Server/WireMockServer.Proxy.cs | 2 + src/WireMock.Net/Server/WireMockServer.cs | 8 ++-- .../Services/IRandomizerDoubleBetween0And1.cs | 2 + .../Services/RandomizerDoubleBetween0And1.cs | 2 + .../Settings/HttpClientSettings.cs | 2 + .../Settings/ProxyAndRecordSettings.cs | 2 + .../Settings/ProxySaveMappingSetting.cs | 2 + .../Settings/ProxySaveMappingSettings.cs | 2 + .../Settings/ProxyUrlReplaceSettings.cs | 2 + .../Settings/SimpleSettingsParser.cs | 2 + src/WireMock.Net/Settings/WebProxySettings.cs | 2 + src/WireMock.Net/Settings/WebhookSettings.cs | 2 + .../Settings/WireMockCertificateSettings.cs | 2 + .../Settings/WireMockServerSettings.cs | 2 + .../Settings/WireMockServerSettingsParser.cs | 2 + .../Transformers/Handlebars/FileHelpers.cs | 2 + .../Handlebars/HandlebarsContext.cs | 2 + .../Handlebars/HandlebarsContextFactory.cs | 2 + .../Handlebars/IHandlebarsContext.cs | 2 + .../Handlebars/WireMockHandlebarsHelpers.cs | 4 +- src/WireMock.Net/Transformers/ITransformer.cs | 2 + .../Transformers/ITransformerContext.cs | 2 + .../ITransformerContextFactory.cs | 4 +- .../Transformers/Scriban/ScribanContext.cs | 2 + .../Scriban/ScribanContextFactory.cs | 2 + .../Scriban/WireMockListAccessor.cs | 2 + .../Scriban/WireMockTemplateContext.cs | 2 + .../Transformers/TransformModel.cs | 2 + src/WireMock.Net/Transformers/Transformer.cs | 2 + src/WireMock.Net/Util/BodyParser.cs | 2 + src/WireMock.Net/Util/BodyParserSettings.cs | 2 + src/WireMock.Net/Util/BytesEncodingUtils.cs | 2 + src/WireMock.Net/Util/CSharpFormatter.cs | 2 + src/WireMock.Net/Util/CompressionUtils.cs | 2 + .../Util/ConcurrentObservableCollection.cs | 2 + .../Util/CultureInfoExtensions.cs | 2 + src/WireMock.Net/Util/DateTimeUtils.cs | 2 + src/WireMock.Net/Util/DictionaryExtensions.cs | 2 + .../Util/EnhancedFileSystemWatcher.cs | 2 + src/WireMock.Net/Util/FileHelper.cs | 2 + src/WireMock.Net/Util/GuidUtils.cs | 2 + .../Util/HttpStatusRangeParser.cs | 2 + src/WireMock.Net/Util/HttpVersionParser.cs | 2 + src/WireMock.Net/Util/JsonUtils.cs | 2 + src/WireMock.Net/Util/MimeKitUtils.cs | 2 + src/WireMock.Net/Util/PathUtils.cs | 2 + src/WireMock.Net/Util/PortUtils.cs | 2 + src/WireMock.Net/Util/ProtoBufUtils.cs | 2 + src/WireMock.Net/Util/QueryStringParser.cs | 2 + src/WireMock.Net/Util/ReflectionUtils.cs | 2 + src/WireMock.Net/Util/RegexUtils.cs | 2 + src/WireMock.Net/Util/SingletonFactory.cs | 2 + src/WireMock.Net/Util/StreamUtils.cs | 2 + src/WireMock.Net/Util/StringUtils.cs | 2 + src/WireMock.Net/Util/SystemUtils.cs | 2 + src/WireMock.Net/Util/TinyMapperUtils.cs | 2 + src/WireMock.Net/Util/TypeLoader.cs | 2 + src/WireMock.Net/Util/UrlUtils.cs | 2 + src/WireMock.Net/WireMock.Net.csproj | 2 - .../GetAdminMappingsByStubMappingIdResult.cs | 2 + .../GetAdminMappingsResult.cs | 2 + .../GetAdminRecordingsStatusResult.cs | 2 + ...tAdminRequestsUnmatchedNearMissesResult.cs | 2 + .../GetAdminScenariosResult.cs | 2 + src/WireMock.Org.Abstractions/Mapping.cs | 2 + .../MappingsRequest.cs | 2 + .../MappingsRequestBasicAuthCredentials.cs | 2 + .../MappingsResponse.cs | 2 + .../MappingsResponseFaultConstants.cs | 2 + src/WireMock.Org.Abstractions/Meta.cs | 2 + src/WireMock.Org.Abstractions/NearMisses.cs | 2 + .../PostAdminMappingsFindByMetadataResult.cs | 2 + .../PostAdminMappingsResult.cs | 2 + ...PostAdminNearMissesRequestPatternResult.cs | 2 + .../PostAdminNearMissesRequestResult.cs | 2 + .../PostAdminRecordingsSnapshotResult.cs | 2 + .../PostAdminRecordingsStopResult.cs | 2 + .../PostAdminRequestsCountResult.cs | 2 + .../PutAdminMappingsByStubMappingIdResult.cs | 2 + src/WireMock.Org.Abstractions/Request.cs | 2 + .../RequestBasicAuthCredentials.cs | 2 + src/WireMock.Org.Abstractions/Response.cs | 2 + .../ResponseFaultConstants.cs | 2 + src/WireMock.Org.Abstractions/Scenarios.cs | 2 + .../StatusConstants.cs | 2 + .../WireMock.Org.Abstractions.csproj | 6 --- .../IWireMockOrgApi.cs | 2 + .../WireMock.Org.RestClient.csproj | 1 - src/dotnet-WireMock.Net/Program.cs | 2 + src/dotnet-WireMock.Net/WireMockLogger.cs | 4 +- .../WireMockAdminApiTests.GetMappingsAsync.cs | 2 + .../AdminApi/WireMockAdminApiTests.cs | 2 + .../Builders/AdminApiMappingBuilderTests.cs | 2 + .../Extensions/DictionaryExtensionsTests.cs | 2 + .../Extensions/EnumExtensionsTests.cs | 2 + .../WireMockAssertionsExtensions.cs | 2 + .../WireMockAssertionsTests.cs | 2 + .../Grpc/WireMockServerTests.Grpc.cs | 2 + .../Handlers/LocalFileSystemHandlerTests.cs | 2 + .../Http/ByteArrayContentHelperTests.cs | 2 + .../Http/HttpRequestMessageHelperTests.cs | 2 + .../Http/StringContentHelperTests.cs | 2 + .../WireMock.Net.Tests/MappingBuilderTests.cs | 2 + .../Matchers/CSharpCodeMatcherTests.cs | 2 + .../Matchers/ContentTypeMatcherTests.cs | 2 + .../Matchers/ExactMatcherTests.cs | 2 + .../Matchers/ExactObjectMatcherTests.cs | 2 + .../Matchers/GraphQLMatcherTests.cs | 2 + .../Matchers/JmesPathMatcherTests.cs | 2 + .../Matchers/JsonMatcherTests.cs | 2 + .../Matchers/JsonPartialMatcherTests.cs | 2 + .../JsonPartialWildcardMatcherTests.cs | 2 + .../Matchers/JsonPathMatcherTests.cs | 2 + .../Matchers/LinqMatcherTests.cs | 2 + .../Matchers/MatchBehaviourHelperTests.cs | 2 + .../Matchers/MimePartMatcherTests.cs | 2 + .../WireMockCustomScalarGraphTypeTests.cs | 2 + .../Matchers/NotNullOrEmptyMatcherTests.cs | 2 + .../Matchers/ProtoBufMatcherTests.cs | 2 + .../Matchers/RegexMatcherTests.cs | 2 + .../Matchers/RequestMatchResultTests.cs | 2 + .../Matchers/SimMetricsMatcherTests.cs | 2 + .../Matchers/WildcardMatcherTest.cs | 2 + .../Matchers/XPathMatcherTests.cs | 2 + .../ObservableLogEntriesTest.cs | 2 + .../Owin/GlobalExceptionMiddlewareTests.cs | 2 + .../Owin/HostUrlOptionsTests.cs | 2 + .../Owin/Mappers/OwinResponseMapperTests.cs | 2 + .../Owin/MappingMatcherTests.cs | 2 + .../Owin/WireMockMiddlewareTests.cs | 2 + test/WireMock.Net.Tests/Pact/PactTests.cs | 2 + .../RegularExpressions/RegexExtendedTests.cs | 2 + .../RequestBuilders/RequestBuilderTests.cs | 2 + .../RequestBuilderUsingMethodTests.cs | 2 + .../RequestBuilderWithBodyTests.cs | 2 + .../RequestBuilderWithClientIPTests.cs | 2 + .../RequestBuilderWithCookieTests.cs | 2 + .../RequestBuilderWithGraphQLSchemaTests.cs | 2 + .../RequestBuilderWithHeaderTests.cs | 2 + .../RequestBuilderWithMultiPartTests.cs | 2 + .../RequestBuilderWithParamTests.cs | 2 + .../RequestBuilderWithPathTests.cs | 2 + .../RequestBuilderWithProtoBufTests.cs | 2 + .../RequestBuilderWithUrlTests.cs | 2 + .../RequestMessageBodyMatcherTests.cs | 2 + .../RequestMessageCompositeMatcherTests.cs | 2 + .../RequestMessageCookieMatcherTests.cs | 2 + .../RequestMessageGraphQLMatcherTests.cs | 2 + .../RequestMessageHeaderMatcherTests.cs | 2 + .../RequestMessageMethodMatcherTests.cs | 2 + .../RequestMessageMultiPartMatcher.cs | 2 + .../RequestMessageParamMatcherTests.cs | 2 + .../WireMock.Net.Tests/RequestMessageTests.cs | 2 + .../ResponseBuilders/ResponseCreateTests.cs | 2 + .../ResponseWithBodyFromFileTests.cs | 2 + .../ResponseBuilders/ResponseWithBodyTests.cs | 2 + .../ResponseWithCallbackTests.cs | 2 + .../ResponseWithFaultTests.cs | 2 + .../ResponseWithHandlebarsDateTimeTests.cs | 2 + .../ResponseWithHandlebarsFileTests.cs | 2 + .../ResponseWithHandlebarsHelpersTests.cs | 2 + .../ResponseWithHandlebarsHumanizerTests.cs | 2 + .../ResponseWithHandlebarsJsonPathTests.cs | 2 + .../ResponseWithHandlebarsLinqTests.cs | 2 + .../ResponseWithHandlebarsRandomTests.cs | 2 + .../ResponseWithHandlebarsRegexTests.cs | 2 + .../ResponseWithHandlebarsXPathTests.cs | 2 + .../ResponseWithHandlebarsXegerTests.cs | 2 + .../ResponseWithHeadersTests.cs | 2 + .../ResponseWithProxyTests.cs | 2 + .../ResponseWithScribanTests.cs | 2 + .../ResponseWithStatusCodeTests.cs | 2 + .../ResponseWithTransformerTests.cs | 2 + .../Serialization/CustomPathParamMatcher.cs | 2 + .../CustomPathParamMatcherModel.cs | 2 + .../Serialization/LogEntryMapperTests.cs | 2 + .../MappingConverterTests.ToCSharpCode.cs | 2 + .../Serialization/MappingConverterTests.cs | 2 + .../MappingFileNameSanitizerTests.cs | 2 + .../Serialization/MatcherMapperTests.cs | 2 + .../ProxyMappingConverterTests.cs | 2 + .../Serialization/WebhookMapperTests.cs | 2 + .../Settings/SimpleSettingsParserTests.cs | 2 + .../WireMockServerSettingsParserTests.cs | 2 + .../StatefulBehaviorTests.cs | 2 + test/WireMock.Net.Tests/TestUtils.cs | 2 + .../Testcontainers/TestcontainersTests.cs | 2 + .../HandlebarsContextFactoryTests.cs | 2 + .../Scriban/ScribanContextFactoryTests.cs | 4 +- .../Util/BodyParserTests.cs | 2 + .../Util/BytesEncodingUtilsTests.cs | 2 + .../Util/CSharpFormatterTests.cs | 2 + .../Util/CompressionUtilsTests.cs | 2 + .../Util/CultureInfoUtilsTests.cs | 2 + .../Util/FileHelperTests.cs | 2 + .../Util/HttpStatusRangeParserTests.cs | 2 + .../Util/HttpVersionParserTests.cs | 2 + .../WireMock.Net.Tests/Util/JsonUtilsTests.cs | 2 + .../WireMock.Net.Tests/Util/PathUtilsTests.cs | 2 + .../WireMock.Net.Tests/Util/PortUtilsTests.cs | 2 + .../Util/QueryStringParserTests.cs | 2 + .../Util/RegexUtilsTests.cs | 2 + .../Util/StringUtilsTests.cs | 2 + .../Util/SystemUtilsTests.cs | 2 + .../Util/TypeLoaderTests.cs | 2 + test/WireMock.Net.Tests/Util/UrlUtilsTests.cs | 2 + .../VerifyExtensions/VerifyNewtonsoftJson.cs | 2 + .../VerifySettingsExtensions.cs | 2 + .../WireMock.Net.Tests.csproj | 1 - .../WireMockServer.Admin.cs | 2 + .../WireMockServer.AdminFiles.cs | 2 + .../WireMockServer.Authentication.cs | 2 + .../WireMockServer.ImportWireMockOrg.cs | 2 + .../WireMockServer.Proxy.cs | 2 + .../WireMockServer.Proxy2.cs | 2 + .../WireMockServer.Settings.cs | 2 + .../WireMockServer.WebhookTests.cs | 2 + .../WireMockServerTests.ClientCertificate.cs | 2 + .../WireMockServerTests.WithBody.cs | 2 + .../WireMockServerTests.WithCallback.cs | 2 + .../WireMockServerTests.WithMultiPart.cs | 2 + .../WireMockServerTests.WithParam.cs | 2 + .../WireMockServerTests.WithProbability.cs | 2 + .../WireMock.Net.Tests/WireMockServerTests.cs | 2 + .../WireMockServerWithMappingTests.cs | 2 + tools/MultipartUploader/Form1.Designer.cs | 4 +- tools/MultipartUploader/Form1.cs | 2 + tools/MultipartUploader/Program.cs | 2 + 573 files changed, 1292 insertions(+), 170 deletions(-) create mode 100644 hdr.ps1 create mode 100644 src/Directory.Build.props diff --git a/.editorconfig b/.editorconfig index 0d64ba1ec..b13e7f1f4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,4 +3,8 @@ indent_style = space indent_size = 4 end_of_line = crlf charset = utf-8 -trim_trailing_whitespace = true \ No newline at end of file +trim_trailing_whitespace = true + +# C# files +[*.cs] +file_header_template=Copyright © WireMock.Net \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 16a6b3ee7..00af8e67a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -13,7 +13,7 @@ https://github.com/WireMock-Net/WireMock.Net ../../resources/WireMock.Net-Logo.ico PackageReadme.md - Latest + 12.0 enable diff --git a/README.md b/README.md index aefd98d2e..ca938f0a5 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ For more info, see also this WIKI page: [What is WireMock.Net](https://github.co |   **Quality** | [![Sonar Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=alert_status)](https://sonarcloud.io/project/issues?id=WireMock-Net_WireMock.Net) [![CodeFactor](https://www.codefactor.io/repository/github/wiremock-net/wiremock.net/badge)](https://www.codefactor.io/repository/github/wiremock-net/wiremock.net) | |   **Sonar Bugs** | [![Sonar Bugs](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=bugs)](https://sonarcloud.io/project/issues?id=WireMock-Net_WireMock.Net&resolved=false&types=BUG) [![Sonar Code Smells](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=code_smells)](https://sonarcloud.io/project/issues?id=WireMock-Net_WireMock.Net&resolved=false&types=CODE_SMELL) | |   **Coverage** | [![Sonar Coverage](https://sonarcloud.io/api/project_badges/measure?project=WireMock-Net_WireMock.Net&metric=coverage)](https://sonarcloud.io/component_measures?id=WireMock-Net_WireMock.Net&metric=coverage) [![codecov](https://codecov.io/gh/WireMock-Net/WireMock.Net/branch/master/graph/badge.svg)](https://codecov.io/gh/WireMock-Net/WireMock.Net)| +|   **TIOBE** | [TIOBE Quality Indicator](https://ticsdemo.tiobe.com/tiobeweb/DEMO/TqiDashboard.html#axes=Project(WireMock.Net),Sub()&metric=tqi) ### :package: NuGet packages diff --git a/WireMock.Net Solution.sln b/WireMock.Net Solution.sln index 714e78758..f94f6c3d0 100644 --- a/WireMock.Net Solution.sln +++ b/WireMock.Net Solution.sln @@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 17.0.31521.260 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{8F890C6F-9ACC-438D-928A-AD61CDA862F2}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{0BB8B634-407A-4610-A91F-11586990767A}" EndProject diff --git a/WireMock.Net Solution.sln.DotSettings b/WireMock.Net Solution.sln.DotSettings index d26576695..95eb13a0b 100644 --- a/WireMock.Net Solution.sln.DotSettings +++ b/WireMock.Net Solution.sln.DotSettings @@ -23,6 +23,7 @@ WWW XMS XUA + True True True True diff --git a/examples/WireMock.Net.Client.Net472/Program.cs b/examples/WireMock.Net.Client.Net472/Program.cs index 73d33f75d..da6a6d43e 100644 --- a/examples/WireMock.Net.Client.Net472/Program.cs +++ b/examples/WireMock.Net.Client.Net472/Program.cs @@ -1,4 +1,6 @@ -using Newtonsoft.Json; +// Copyright © WireMock.Net + +using Newtonsoft.Json; using RestEase; using System; using System.Net.Http.Headers; diff --git a/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs index 0be677a99..fc30bafdb 100644 --- a/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs +++ b/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © WireMock.Net + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/examples/WireMock.Net.Console.GrpcClient/Program.cs b/examples/WireMock.Net.Console.GrpcClient/Program.cs index 37b3df497..e26abceb4 100644 --- a/examples/WireMock.Net.Console.GrpcClient/Program.cs +++ b/examples/WireMock.Net.Console.GrpcClient/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Greet; using Grpc.Net.Client; diff --git a/examples/WireMock.Net.Console.NET6.WithCertificate/Program.cs b/examples/WireMock.Net.Console.NET6.WithCertificate/Program.cs index 7b571d98f..c81eca174 100644 --- a/examples/WireMock.Net.Console.NET6.WithCertificate/Program.cs +++ b/examples/WireMock.Net.Console.NET6.WithCertificate/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using WireMock.Logging; using WireMock.Server; diff --git a/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs b/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs index df1c89de4..4707f295c 100644 --- a/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs +++ b/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net; using System.Net.Http.Headers; using System.Text; diff --git a/examples/WireMock.Net.Console.NET8/__admin/mappings/1.cs b/examples/WireMock.Net.Console.NET8/__admin/mappings/1.cs index c8143e099..470713ac7 100644 --- a/examples/WireMock.Net.Console.NET8/__admin/mappings/1.cs +++ b/examples/WireMock.Net.Console.NET8/__admin/mappings/1.cs @@ -1 +1,3 @@ +// Copyright © WireMock.Net + // C# Hello \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp/Program.cs b/examples/WireMock.Net.Console.NETCoreApp/Program.cs index e486bf165..b86370aa2 100644 --- a/examples/WireMock.Net.Console.NETCoreApp/Program.cs +++ b/examples/WireMock.Net.Console.NETCoreApp/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Reflection; using log4net; diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs index c8143e099..470713ac7 100644 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs +++ b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs @@ -1 +1,3 @@ +// Copyright © WireMock.Net + // C# Hello \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs index 1c73463c6..0037ff12a 100644 --- a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs +++ b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Logging; using WireMock.Server; using WireMock.Settings; diff --git a/examples/WireMock.Net.Console.Net452.Classic/CustomFileSystemFileHandler.cs b/examples/WireMock.Net.Console.Net452.Classic/CustomFileSystemFileHandler.cs index a04adae19..74ab05787 100644 --- a/examples/WireMock.Net.Console.Net452.Classic/CustomFileSystemFileHandler.cs +++ b/examples/WireMock.Net.Console.Net452.Classic/CustomFileSystemFileHandler.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.IO; using WireMock.Handlers; diff --git a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs index e9a89eac4..95b6075d4 100644 --- a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs +++ b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Globalization; diff --git a/examples/WireMock.Net.Console.Net452.Classic/Program.cs b/examples/WireMock.Net.Console.Net452.Classic/Program.cs index b6314fc27..26a840ded 100644 --- a/examples/WireMock.Net.Console.Net452.Classic/Program.cs +++ b/examples/WireMock.Net.Console.Net452.Classic/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using log4net.Config; diff --git a/examples/WireMock.Net.Console.Net452.Classic/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Console.Net452.Classic/Properties/AssemblyInfo.cs index 8aee3f965..48a349255 100644 --- a/examples/WireMock.Net.Console.Net452.Classic/Properties/AssemblyInfo.cs +++ b/examples/WireMock.Net.Console.Net452.Classic/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © WireMock.Net + +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/WireMock.Net.Console.Net461.Classic/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Console.Net461.Classic/Properties/AssemblyInfo.cs index a10ce6d38..adff6bda3 100644 --- a/examples/WireMock.Net.Console.Net461.Classic/Properties/AssemblyInfo.cs +++ b/examples/WireMock.Net.Console.Net461.Classic/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © WireMock.Net + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/examples/WireMock.Net.Console.Net472.Classic/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Console.Net472.Classic/Properties/AssemblyInfo.cs index a10ce6d38..adff6bda3 100644 --- a/examples/WireMock.Net.Console.Net472.Classic/Properties/AssemblyInfo.cs +++ b/examples/WireMock.Net.Console.Net472.Classic/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © WireMock.Net + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs b/examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs index 0d9090957..616e72b32 100644 --- a/examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs +++ b/examples/WireMock.Net.Console.Proxy.NETCoreApp/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Newtonsoft.Json; using WireMock.Logging; using WireMock.RequestBuilders; diff --git a/examples/WireMock.Net.Console.Proxy.Net452/Program.cs b/examples/WireMock.Net.Console.Proxy.Net452/Program.cs index b0e9457fe..d482974c1 100644 --- a/examples/WireMock.Net.Console.Proxy.Net452/Program.cs +++ b/examples/WireMock.Net.Console.Proxy.Net452/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Specialized; using System.Net.Http; diff --git a/examples/WireMock.Net.Console.Proxy.Net452/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Console.Proxy.Net452/Properties/AssemblyInfo.cs index 602536653..55991665e 100644 --- a/examples/WireMock.Net.Console.Proxy.Net452/Properties/AssemblyInfo.cs +++ b/examples/WireMock.Net.Console.Proxy.Net452/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © WireMock.Net + +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/WireMock.Net.Console.RequestLogTest/Program.cs b/examples/WireMock.Net.Console.RequestLogTest/Program.cs index 6519f9f4e..d1aeab3be 100644 --- a/examples/WireMock.Net.Console.RequestLogTest/Program.cs +++ b/examples/WireMock.Net.Console.RequestLogTest/Program.cs @@ -1,4 +1,6 @@ -using System; +// Copyright © WireMock.Net + +using System; using System.Linq; using System.Net.Http; using System.Threading.Tasks; diff --git a/examples/WireMock.Net.OpenApiParser.ConsoleApp/DynamicDataGeneration.cs b/examples/WireMock.Net.OpenApiParser.ConsoleApp/DynamicDataGeneration.cs index 3d6023e18..a67708d61 100644 --- a/examples/WireMock.Net.OpenApiParser.ConsoleApp/DynamicDataGeneration.cs +++ b/examples/WireMock.Net.OpenApiParser.ConsoleApp/DynamicDataGeneration.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using RandomDataGenerator.FieldOptions; using RandomDataGenerator.Randomizers; using WireMock.Net.OpenApiParser.Settings; diff --git a/examples/WireMock.Net.OpenApiParser.ConsoleApp/Program.cs b/examples/WireMock.Net.OpenApiParser.ConsoleApp/Program.cs index 30b8b23c5..13230f903 100644 --- a/examples/WireMock.Net.OpenApiParser.ConsoleApp/Program.cs +++ b/examples/WireMock.Net.OpenApiParser.ConsoleApp/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using WireMock.RequestBuilders; diff --git a/examples/WireMock.Net.OpenApiParser.ConsoleApp/Run.cs b/examples/WireMock.Net.OpenApiParser.ConsoleApp/Run.cs index 4ff3f7758..4ac228a5a 100644 --- a/examples/WireMock.Net.OpenApiParser.ConsoleApp/Run.cs +++ b/examples/WireMock.Net.OpenApiParser.ConsoleApp/Run.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/examples/WireMock.Net.Service/Installer.Designer.cs b/examples/WireMock.Net.Service/Installer.Designer.cs index 765a90581..f90d812d6 100644 --- a/examples/WireMock.Net.Service/Installer.Designer.cs +++ b/examples/WireMock.Net.Service/Installer.Designer.cs @@ -1,4 +1,6 @@ -namespace Wiremock.Net.Service +// Copyright © WireMock.Net + +namespace Wiremock.Net.Service { partial class Installer { diff --git a/examples/WireMock.Net.Service/Installer.cs b/examples/WireMock.Net.Service/Installer.cs index 5e9840a92..f7ca5cf8a 100644 --- a/examples/WireMock.Net.Service/Installer.cs +++ b/examples/WireMock.Net.Service/Installer.cs @@ -1,4 +1,6 @@ -using System; +// Copyright © WireMock.Net + +using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; diff --git a/examples/WireMock.Net.Service/Program.cs b/examples/WireMock.Net.Service/Program.cs index 27e096ff5..87e624c31 100644 --- a/examples/WireMock.Net.Service/Program.cs +++ b/examples/WireMock.Net.Service/Program.cs @@ -1,4 +1,6 @@ -using log4net.Config; +// Copyright © WireMock.Net + +using log4net.Config; using System; using System.IO; using System.ServiceProcess; diff --git a/examples/WireMock.Net.Service/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Service/Properties/AssemblyInfo.cs index 75fd56760..ad95d2e1c 100644 --- a/examples/WireMock.Net.Service/Properties/AssemblyInfo.cs +++ b/examples/WireMock.Net.Service/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Reflection; +// Copyright © WireMock.Net + +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/WireMock.Net.Service/WireMockLog4NetLogger.cs b/examples/WireMock.Net.Service/WireMockLog4NetLogger.cs index 62d79d683..8eb3f8c72 100644 --- a/examples/WireMock.Net.Service/WireMockLog4NetLogger.cs +++ b/examples/WireMock.Net.Service/WireMockLog4NetLogger.cs @@ -1,4 +1,6 @@ -using System; +// Copyright © WireMock.Net + +using System; using log4net; using Newtonsoft.Json; using Wiremock.Net.Service; diff --git a/examples/WireMock.Net.TestcontainersExample/Program.cs b/examples/WireMock.Net.TestcontainersExample/Program.cs index bf26c03d9..52a39c22b 100644 --- a/examples/WireMock.Net.TestcontainersExample/Program.cs +++ b/examples/WireMock.Net.TestcontainersExample/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Newtonsoft.Json; using Testcontainers.MsSql; using WireMock.Net.Testcontainers; diff --git a/examples/WireMock.Net.WebApplication.NET6/App.cs b/examples/WireMock.Net.WebApplication.NET6/App.cs index e4454f070..d9ac8caae 100644 --- a/examples/WireMock.Net.WebApplication.NET6/App.cs +++ b/examples/WireMock.Net.WebApplication.NET6/App.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Microsoft.Extensions.Hosting; using System.Threading; using System.Threading.Tasks; diff --git a/examples/WireMock.Net.WebApplication.NET6/IWireMockService.cs b/examples/WireMock.Net.WebApplication.NET6/IWireMockService.cs index 764dd202c..a62a103c7 100644 --- a/examples/WireMock.Net.WebApplication.NET6/IWireMockService.cs +++ b/examples/WireMock.Net.WebApplication.NET6/IWireMockService.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Net.WebApplication; public interface IWireMockService diff --git a/examples/WireMock.Net.WebApplication.NET6/Program.cs b/examples/WireMock.Net.WebApplication.NET6/Program.cs index 69561724e..4759d47ef 100644 --- a/examples/WireMock.Net.WebApplication.NET6/Program.cs +++ b/examples/WireMock.Net.WebApplication.NET6/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/examples/WireMock.Net.WebApplication.NET6/WireMockService.cs b/examples/WireMock.Net.WebApplication.NET6/WireMockService.cs index 818e2a8dd..58bbdc14b 100644 --- a/examples/WireMock.Net.WebApplication.NET6/WireMockService.cs +++ b/examples/WireMock.Net.WebApplication.NET6/WireMockService.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; diff --git a/examples/WireMock.Net.WebApplication.NETCore3/App.cs b/examples/WireMock.Net.WebApplication.NETCore3/App.cs index a9349b592..8ef7e7df0 100644 --- a/examples/WireMock.Net.WebApplication.NETCore3/App.cs +++ b/examples/WireMock.Net.WebApplication.NETCore3/App.cs @@ -1,4 +1,6 @@ -using Microsoft.Extensions.Hosting; +// Copyright © WireMock.Net + +using Microsoft.Extensions.Hosting; using System.Threading; using System.Threading.Tasks; diff --git a/examples/WireMock.Net.WebApplication.NETCore3/IWireMockService.cs b/examples/WireMock.Net.WebApplication.NETCore3/IWireMockService.cs index 5c3f35472..bb778bb63 100644 --- a/examples/WireMock.Net.WebApplication.NETCore3/IWireMockService.cs +++ b/examples/WireMock.Net.WebApplication.NETCore3/IWireMockService.cs @@ -1,4 +1,6 @@ -namespace WireMock.Net.WebApplication +// Copyright © WireMock.Net + +namespace WireMock.Net.WebApplication { public interface IWireMockService { diff --git a/examples/WireMock.Net.WebApplication.NETCore3/Program.cs b/examples/WireMock.Net.WebApplication.NETCore3/Program.cs index 8243834f8..d64c2b23e 100644 --- a/examples/WireMock.Net.WebApplication.NETCore3/Program.cs +++ b/examples/WireMock.Net.WebApplication.NETCore3/Program.cs @@ -1,4 +1,6 @@ -using Microsoft.Extensions.Configuration; +// Copyright © WireMock.Net + +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; diff --git a/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs b/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs index 1f02e6157..784c6bdc6 100644 --- a/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs +++ b/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs @@ -1,4 +1,6 @@ -using System; +// Copyright © WireMock.Net + +using System; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; diff --git a/examples/WireMockAzureQueueExample/Function1.cs b/examples/WireMockAzureQueueExample/Function1.cs index 630b4866d..5482c66a8 100644 --- a/examples/WireMockAzureQueueExample/Function1.cs +++ b/examples/WireMockAzureQueueExample/Function1.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Microsoft.Azure.WebJobs; using Microsoft.Extensions.Logging; diff --git a/examples/WireMockAzureQueueProxy/Program.cs b/examples/WireMockAzureQueueProxy/Program.cs index a91efe53f..2bda2c5b3 100644 --- a/examples/WireMockAzureQueueProxy/Program.cs +++ b/examples/WireMockAzureQueueProxy/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Newtonsoft.Json; using WireMock.Logging; using WireMock.Server; diff --git a/hdr.ps1 b/hdr.ps1 new file mode 100644 index 000000000..49f265db3 --- /dev/null +++ b/hdr.ps1 @@ -0,0 +1,23 @@ +param($target = "C:\Dev\Github\WireMock.Net") + +$header = "// Copyright © WireMock.Net +" + +function Write-Header ($file) { + $content = Get-Content $file -Raw # Using -Raw to read the entire file as a single string + $filename = Split-Path -Leaf $file + + # Check if the file content starts with the auto-generated line + if ($content.TrimStart().StartsWith("// ")) { + Write-Host "Skipping auto-generated file: $filename" + } else { + # If not an auto-generated file, prepend the header + Set-Content $file $header + Add-Content $file $content -NoNewline # Writing back to the file without an extra newline + } +} + +Get-ChildItem $target -Recurse | ? { $_.Extension -like ".cs" } | % ` +{ + Write-Header $_.PSPath.Split(":", 3)[2] +} \ No newline at end of file diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 000000000..53beab650 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,15 @@ + + + 12.0 + enable + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/BodyModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/BodyModel.cs index 86dd43810..d958bfd98 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/BodyModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/BodyModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/ClientIPModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/ClientIPModel.cs index bba78a949..44e942891 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/ClientIPModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/ClientIPModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/CookieModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/CookieModel.cs index c48051eb9..e35746eff 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/CookieModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/CookieModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; namespace WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/EncodingModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/EncodingModel.cs index 529e2116d..8c698d28b 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/EncodingModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/EncodingModel.cs @@ -1,4 +1,6 @@ -namespace WireMock.Admin.Mappings +// Copyright © WireMock.Net + +namespace WireMock.Admin.Mappings { /// /// EncodingModel diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs index 622aeecca..b140679ef 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/HeaderModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/HeaderModel.cs index 3a0fbf857..ba3b31a0a 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/HeaderModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/HeaderModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; namespace WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/MappingModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/MappingModel.cs index e570065ce..33d4f4248 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/MappingModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/MappingModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Models; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/MatcherModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/MatcherModel.cs index d7837ffcd..61e70fb84 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/MatcherModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/MatcherModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/ParamModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/ParamModel.cs index d5559ec63..4ee7e9a10 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/ParamModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/ParamModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/PathModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/PathModel.cs index 9413d3fe6..48941b9f2 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/PathModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/PathModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/RequestModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/RequestModel.cs index 8953c7326..eeaa2760d 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/RequestModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/RequestModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; namespace WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/ResponseModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/ResponseModel.cs index 1857cea96..5e15acba2 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/ResponseModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/ResponseModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Admin.Settings; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/StatusModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/StatusModel.cs index 348e36bda..2259bc599 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/StatusModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/StatusModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/TimeSettingsModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/TimeSettingsModel.cs index bd63b74e3..4c1c3ba8a 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/TimeSettingsModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/TimeSettingsModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Models diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/UrlModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/UrlModel.cs index 57348abfd..1db0655f2 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/UrlModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/UrlModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/WebProxyModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/WebProxyModel.cs index cba3870a0..ff3c36f61 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/WebProxyModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/WebProxyModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookModel.cs index 514c13f9f..df3716ce7 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookRequestModel.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookRequestModel.cs index 43c811f0e..f61ae0b97 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookRequestModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/WebhookRequestModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; namespace WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Admin/Mappings/XmlNamespace.cs b/src/WireMock.Net.Abstractions/Admin/Mappings/XmlNamespace.cs index ca2565672..38e1f297f 100644 --- a/src/WireMock.Net.Abstractions/Admin/Mappings/XmlNamespace.cs +++ b/src/WireMock.Net.Abstractions/Admin/Mappings/XmlNamespace.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Mappings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Requests/LogEntryModel.cs b/src/WireMock.Net.Abstractions/Admin/Requests/LogEntryModel.cs index aa895697e..b9c5460a7 100644 --- a/src/WireMock.Net.Abstractions/Admin/Requests/LogEntryModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Requests/LogEntryModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Admin.Requests; diff --git a/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestMatchModel.cs b/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestMatchModel.cs index f187867fc..6a3796275 100644 --- a/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestMatchModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestMatchModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; namespace WireMock.Admin.Requests; diff --git a/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestModel.cs b/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestModel.cs index f1e7f84a1..44f9ecc0b 100644 --- a/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Requests/LogRequestModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Admin/Requests/LogResponseModel.cs b/src/WireMock.Net.Abstractions/Admin/Requests/LogResponseModel.cs index 5e4b2429a..946449d62 100644 --- a/src/WireMock.Net.Abstractions/Admin/Requests/LogResponseModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Requests/LogResponseModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Admin.Mappings; using WireMock.Types; diff --git a/src/WireMock.Net.Abstractions/Admin/Scenarios/ScenarioStateModel.cs b/src/WireMock.Net.Abstractions/Admin/Scenarios/ScenarioStateModel.cs index bd204a88f..46851d887 100644 --- a/src/WireMock.Net.Abstractions/Admin/Scenarios/ScenarioStateModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Scenarios/ScenarioStateModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Scenarios { /// diff --git a/src/WireMock.Net.Abstractions/Admin/Settings/ProxyAndRecordSettingsModel.cs b/src/WireMock.Net.Abstractions/Admin/Settings/ProxyAndRecordSettingsModel.cs index fa09a5b05..553dd0b96 100644 --- a/src/WireMock.Net.Abstractions/Admin/Settings/ProxyAndRecordSettingsModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Settings/ProxyAndRecordSettingsModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Settings; [FluentBuilder.AutoGenerateBuilder] diff --git a/src/WireMock.Net.Abstractions/Admin/Settings/ProxyUrlReplaceSettingsModel.cs b/src/WireMock.Net.Abstractions/Admin/Settings/ProxyUrlReplaceSettingsModel.cs index b66b122ba..cc9ce5a64 100644 --- a/src/WireMock.Net.Abstractions/Admin/Settings/ProxyUrlReplaceSettingsModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Settings/ProxyUrlReplaceSettingsModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Settings; /// diff --git a/src/WireMock.Net.Abstractions/Admin/Settings/SettingsModel.cs b/src/WireMock.Net.Abstractions/Admin/Settings/SettingsModel.cs index a82f7ae42..050f40e8c 100644 --- a/src/WireMock.Net.Abstractions/Admin/Settings/SettingsModel.cs +++ b/src/WireMock.Net.Abstractions/Admin/Settings/SettingsModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Text.RegularExpressions; using JetBrains.Annotations; diff --git a/src/WireMock.Net.Abstractions/Admin/Settings/WebProxySettings.cs b/src/WireMock.Net.Abstractions/Admin/Settings/WebProxySettings.cs index 51b22f270..f56418f98 100644 --- a/src/WireMock.Net.Abstractions/Admin/Settings/WebProxySettings.cs +++ b/src/WireMock.Net.Abstractions/Admin/Settings/WebProxySettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Admin.Settings; /// diff --git a/src/WireMock.Net.Abstractions/BuilderExtensions/BodyModelBuilder.cs b/src/WireMock.Net.Abstractions/BuilderExtensions/BodyModelBuilder.cs index a4ee1e801..1b32de8eb 100644 --- a/src/WireMock.Net.Abstractions/BuilderExtensions/BodyModelBuilder.cs +++ b/src/WireMock.Net.Abstractions/BuilderExtensions/BodyModelBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; diff --git a/src/WireMock.Net.Abstractions/BuilderExtensions/RequestModelBuilder.cs b/src/WireMock.Net.Abstractions/BuilderExtensions/RequestModelBuilder.cs index 418e740cc..9d47ac763 100644 --- a/src/WireMock.Net.Abstractions/BuilderExtensions/RequestModelBuilder.cs +++ b/src/WireMock.Net.Abstractions/BuilderExtensions/RequestModelBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; // ReSharper disable once CheckNamespace diff --git a/src/WireMock.Net.Abstractions/BuilderExtensions/ResponseModelBuilder.cs b/src/WireMock.Net.Abstractions/BuilderExtensions/ResponseModelBuilder.cs index 5f38dbbfe..9ea99167d 100644 --- a/src/WireMock.Net.Abstractions/BuilderExtensions/ResponseModelBuilder.cs +++ b/src/WireMock.Net.Abstractions/BuilderExtensions/ResponseModelBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Net; diff --git a/src/WireMock.Net.Abstractions/Constants/HttpRequestMethod.cs b/src/WireMock.Net.Abstractions/Constants/HttpRequestMethod.cs index 6f689a09f..3d70e3cf4 100644 --- a/src/WireMock.Net.Abstractions/Constants/HttpRequestMethod.cs +++ b/src/WireMock.Net.Abstractions/Constants/HttpRequestMethod.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Constants; /// diff --git a/src/WireMock.Net.Abstractions/Extensions/RequestModelExtensions.cs b/src/WireMock.Net.Abstractions/Extensions/RequestModelExtensions.cs index 3566d3b49..a9e5fbc39 100644 --- a/src/WireMock.Net.Abstractions/Extensions/RequestModelExtensions.cs +++ b/src/WireMock.Net.Abstractions/Extensions/RequestModelExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using WireMock.Admin.Mappings; diff --git a/src/WireMock.Net.Abstractions/Extensions/ResponseModelExtensions.cs b/src/WireMock.Net.Abstractions/Extensions/ResponseModelExtensions.cs index 31fc4b12f..641120ce8 100644 --- a/src/WireMock.Net.Abstractions/Extensions/ResponseModelExtensions.cs +++ b/src/WireMock.Net.Abstractions/Extensions/ResponseModelExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Admin.Mappings; namespace WireMock.Extensions; diff --git a/src/WireMock.Net.Abstractions/Handlers/IFileSystemHandler.cs b/src/WireMock.Net.Abstractions/Handlers/IFileSystemHandler.cs index 66c31e84f..6e0dfe3bc 100644 --- a/src/WireMock.Net.Abstractions/Handlers/IFileSystemHandler.cs +++ b/src/WireMock.Net.Abstractions/Handlers/IFileSystemHandler.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using JetBrains.Annotations; using System.Collections.Generic; diff --git a/src/WireMock.Net.Abstractions/IRequestMessage.cs b/src/WireMock.Net.Abstractions/IRequestMessage.cs index 42d9c99fd..63a52a6e6 100644 --- a/src/WireMock.Net.Abstractions/IRequestMessage.cs +++ b/src/WireMock.Net.Abstractions/IRequestMessage.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; #if NETSTANDARD1_3_OR_GREATER || NET461 diff --git a/src/WireMock.Net.Abstractions/IResponseMessage.cs b/src/WireMock.Net.Abstractions/IResponseMessage.cs index 1acdc3a88..92cd22192 100644 --- a/src/WireMock.Net.Abstractions/IResponseMessage.cs +++ b/src/WireMock.Net.Abstractions/IResponseMessage.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.ResponseBuilders; using WireMock.Types; diff --git a/src/WireMock.Net.Abstractions/Logging/ILogEntry.cs b/src/WireMock.Net.Abstractions/Logging/ILogEntry.cs index 79f5290b0..4f5d801e0 100644 --- a/src/WireMock.Net.Abstractions/Logging/ILogEntry.cs +++ b/src/WireMock.Net.Abstractions/Logging/ILogEntry.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net.Abstractions/Logging/IWireMockLogger.cs b/src/WireMock.Net.Abstractions/Logging/IWireMockLogger.cs index 14a047362..c68ce26d7 100644 --- a/src/WireMock.Net.Abstractions/Logging/IWireMockLogger.cs +++ b/src/WireMock.Net.Abstractions/Logging/IWireMockLogger.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using JetBrains.Annotations; using WireMock.Admin.Requests; diff --git a/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatchResult.cs b/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatchResult.cs index 52aae7c3b..c56401139 100644 --- a/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatchResult.cs +++ b/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatchResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; diff --git a/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatcher.cs b/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatcher.cs index 476d3b242..8410846b8 100644 --- a/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatcher.cs +++ b/src/WireMock.Net.Abstractions/Matchers/Request/IRequestMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers.Request; /// diff --git a/src/WireMock.Net.Abstractions/Matchers/Request/MatchDetail.cs b/src/WireMock.Net.Abstractions/Matchers/Request/MatchDetail.cs index 006706e69..6f38a3307 100644 --- a/src/WireMock.Net.Abstractions/Matchers/Request/MatchDetail.cs +++ b/src/WireMock.Net.Abstractions/Matchers/Request/MatchDetail.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Matchers.Request; diff --git a/src/WireMock.Net.Abstractions/Models/IBodyData.cs b/src/WireMock.Net.Abstractions/Models/IBodyData.cs index e74e6193a..5c9b446f5 100644 --- a/src/WireMock.Net.Abstractions/Models/IBodyData.cs +++ b/src/WireMock.Net.Abstractions/Models/IBodyData.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Text; diff --git a/src/WireMock.Net.Abstractions/Models/ITimeSettings.cs b/src/WireMock.Net.Abstractions/Models/ITimeSettings.cs index fb4c44f8d..f5bbcfd8c 100644 --- a/src/WireMock.Net.Abstractions/Models/ITimeSettings.cs +++ b/src/WireMock.Net.Abstractions/Models/ITimeSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Models; diff --git a/src/WireMock.Net.Abstractions/Models/IWebhook.cs b/src/WireMock.Net.Abstractions/Models/IWebhook.cs index 66ad9c83b..c93dce4dd 100644 --- a/src/WireMock.Net.Abstractions/Models/IWebhook.cs +++ b/src/WireMock.Net.Abstractions/Models/IWebhook.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Models; /// diff --git a/src/WireMock.Net.Abstractions/Models/IWebhookRequest.cs b/src/WireMock.Net.Abstractions/Models/IWebhookRequest.cs index c671ccd86..5acee5e02 100644 --- a/src/WireMock.Net.Abstractions/Models/IWebhookRequest.cs +++ b/src/WireMock.Net.Abstractions/Models/IWebhookRequest.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Types; using WireMock.Util; diff --git a/src/WireMock.Net.Abstractions/Models/IdOrText.cs b/src/WireMock.Net.Abstractions/Models/IdOrText.cs index 5d1a4c584..720d8645d 100644 --- a/src/WireMock.Net.Abstractions/Models/IdOrText.cs +++ b/src/WireMock.Net.Abstractions/Models/IdOrText.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Models; /// diff --git a/src/WireMock.Net.Abstractions/ResponseBuilders/FaultType.cs b/src/WireMock.Net.Abstractions/ResponseBuilders/FaultType.cs index d65951a71..efe0f179a 100644 --- a/src/WireMock.Net.Abstractions/ResponseBuilders/FaultType.cs +++ b/src/WireMock.Net.Abstractions/ResponseBuilders/FaultType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // ReSharper disable InconsistentNaming namespace WireMock.ResponseBuilders; diff --git a/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs b/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs index 20169b6d6..2ce69feea 100644 --- a/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs +++ b/src/WireMock.Net.Abstractions/Server/IWireMockServer.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Collections.Specialized; diff --git a/src/WireMock.Net.Abstractions/Types/BodyType.cs b/src/WireMock.Net.Abstractions/Types/BodyType.cs index 47a62ae22..38c14a9d0 100644 --- a/src/WireMock.Net.Abstractions/Types/BodyType.cs +++ b/src/WireMock.Net.Abstractions/Types/BodyType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Types; /// diff --git a/src/WireMock.Net.Abstractions/Types/ClientCertificateMode.cs b/src/WireMock.Net.Abstractions/Types/ClientCertificateMode.cs index 26e772db3..73bd663c7 100644 --- a/src/WireMock.Net.Abstractions/Types/ClientCertificateMode.cs +++ b/src/WireMock.Net.Abstractions/Types/ClientCertificateMode.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Types; #if NETSTANDARD1_3_OR_GREATER || NET461 diff --git a/src/WireMock.Net.Abstractions/Types/CorsPolicyOptions.cs b/src/WireMock.Net.Abstractions/Types/CorsPolicyOptions.cs index c682f4547..639af0f47 100644 --- a/src/WireMock.Net.Abstractions/Types/CorsPolicyOptions.cs +++ b/src/WireMock.Net.Abstractions/Types/CorsPolicyOptions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Types diff --git a/src/WireMock.Net.Abstractions/Types/HostingScheme.cs b/src/WireMock.Net.Abstractions/Types/HostingScheme.cs index 7e2ffe66e..beaaa11f6 100644 --- a/src/WireMock.Net.Abstractions/Types/HostingScheme.cs +++ b/src/WireMock.Net.Abstractions/Types/HostingScheme.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Types; diff --git a/src/WireMock.Net.Abstractions/Types/MappingConverterType.cs b/src/WireMock.Net.Abstractions/Types/MappingConverterType.cs index fc6e93922..e8a8abd77 100644 --- a/src/WireMock.Net.Abstractions/Types/MappingConverterType.cs +++ b/src/WireMock.Net.Abstractions/Types/MappingConverterType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Types; /// diff --git a/src/WireMock.Net.Abstractions/Types/QueryParameterMultipleValueSupport.cs b/src/WireMock.Net.Abstractions/Types/QueryParameterMultipleValueSupport.cs index b8fe260e9..13e042ff2 100644 --- a/src/WireMock.Net.Abstractions/Types/QueryParameterMultipleValueSupport.cs +++ b/src/WireMock.Net.Abstractions/Types/QueryParameterMultipleValueSupport.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Types; diff --git a/src/WireMock.Net.Abstractions/Types/ReplaceNodeOptions.cs b/src/WireMock.Net.Abstractions/Types/ReplaceNodeOptions.cs index 40960016e..e3a347d7c 100644 --- a/src/WireMock.Net.Abstractions/Types/ReplaceNodeOptions.cs +++ b/src/WireMock.Net.Abstractions/Types/ReplaceNodeOptions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Types; /// diff --git a/src/WireMock.Net.Abstractions/Types/TransformerType.cs b/src/WireMock.Net.Abstractions/Types/TransformerType.cs index 9ae26df94..0d3e179b6 100644 --- a/src/WireMock.Net.Abstractions/Types/TransformerType.cs +++ b/src/WireMock.Net.Abstractions/Types/TransformerType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Types; /// diff --git a/src/WireMock.Net.Abstractions/Types/WireMockList.cs b/src/WireMock.Net.Abstractions/Types/WireMockList.cs index b0a7e4f7d..d5505470f 100644 --- a/src/WireMock.Net.Abstractions/Types/WireMockList.cs +++ b/src/WireMock.Net.Abstractions/Types/WireMockList.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj b/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj index 32fa99b03..7a0d9b4e1 100644 --- a/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj +++ b/src/WireMock.Net.Abstractions/WireMock.Net.Abstractions.csproj @@ -35,9 +35,6 @@ - - - all diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockANumberOfCallsAssertions.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockANumberOfCallsAssertions.cs index da103150d..ff4ea9566 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockANumberOfCallsAssertions.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockANumberOfCallsAssertions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Stef.Validation; using WireMock.Server; diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.AtUrl.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.AtUrl.cs index 39451e215..2bbd27fc1 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.AtUrl.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.AtUrl.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System; diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.FromClientIP.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.FromClientIP.cs index e7651bc1f..6af107e66 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.FromClientIP.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.FromClientIP.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System; diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.UsingMethod.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.UsingMethod.cs index 3b29d992b..4c526c7db 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.UsingMethod.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.UsingMethod.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System; using WireMock.Constants; diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithBody.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithBody.cs index b9e364fc3..cf37b7f3b 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithBody.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithBody.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System; using System.Collections.Generic; @@ -23,37 +25,37 @@ public AndConstraint WithBody(string body, string because = } [CustomAssertion] - public AndConstraint WithBodyAsJson(object body, string because = "", params object[] becauseArgs) + public AndConstraint WithBody(IStringMatcher matcher, string because = "", params object[] becauseArgs) { - return WithBodyAsJson(new JsonMatcher(body), because, becauseArgs); + var (filter, condition) = BuildFilterAndCondition(r => r.Body, matcher); + + return ExecuteAssertionWithBodyStringMatcher(matcher, because, becauseArgs, condition, filter, r => r.Body); } [CustomAssertion] - public AndConstraint WithBodyAsJson(string body, string because = "", params object[] becauseArgs) + public AndConstraint WithBodyAsJson(object body, string because = "", params object[] becauseArgs) { return WithBodyAsJson(new JsonMatcher(body), because, becauseArgs); } [CustomAssertion] - public AndConstraint WithBodyAsBytes(byte[] body, string because = "", params object[] becauseArgs) + public AndConstraint WithBodyAsJson(string body, string because = "", params object[] becauseArgs) { - return WithBodyAsBytes(new ExactObjectMatcher(body), because, becauseArgs); + return WithBodyAsJson(new JsonMatcher(body), because, becauseArgs); } [CustomAssertion] - public AndConstraint WithBody(IStringMatcher matcher, string because = "", params object[] becauseArgs) + public AndConstraint WithBodyAsJson(IObjectMatcher matcher, string because = "", params object[] becauseArgs) { - var (filter, condition) = BuildFilterAndCondition(r => r.Body, matcher); + var (filter, condition) = BuildFilterAndCondition(r => r.BodyAsJson, matcher); - return ExecuteAssertionWithBodyStringMatcher(matcher, because, becauseArgs, condition, filter, r => r.Body); + return ExecuteAssertionWithBodyAsIObjectMatcher(matcher, because, becauseArgs, condition, filter, r => r.BodyAsJson); } [CustomAssertion] - public AndConstraint WithBodyAsJson(IObjectMatcher matcher, string because = "", params object[] becauseArgs) + public AndConstraint WithBodyAsBytes(byte[] body, string because = "", params object[] becauseArgs) { - var (filter, condition) = BuildFilterAndCondition(r => r.BodyAsJson, matcher); - - return ExecuteAssertionWithBodyAsIObjectMatcher(matcher, because, becauseArgs, condition, filter, r => r.BodyAsJson); + return WithBodyAsBytes(new ExactObjectMatcher(body), because, becauseArgs); } [CustomAssertion] @@ -140,6 +142,6 @@ private AndConstraint ExecuteAssertionWithBodyAsIObjectMatch private static string? FormatBodies(IEnumerable bodies) { var valueAsArray = bodies as object[] ?? bodies.ToArray(); - return valueAsArray.Length == 1 ? FormatBody(valueAsArray.First()) : $"[ {string.Join(", ", valueAsArray.Select(FormatBody))} ]"; + return valueAsArray.Length == 1 ? FormatBody(valueAsArray[0]) : $"[ {string.Join(", ", valueAsArray.Select(FormatBody))} ]"; } } \ No newline at end of file diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithHeader.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithHeader.cs index 9e90c5def..59ac21aa8 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithHeader.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithHeader.cs @@ -1,6 +1,6 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 -using System.Collections.Generic; -using WireMock.Types; // ReSharper disable once CheckNamespace namespace WireMock.FluentAssertions; @@ -45,7 +45,7 @@ public AndConstraint WithHeader(string expectedKey, string[] { var (filter, condition) = BuildFilterAndCondition(request => { - var headers = request.Headers?.ToArray() ?? new KeyValuePair>[0]; + var headers = request.Headers?.ToArray() ?? []; var matchingHeaderValues = headers.Where(h => h.Key == expectedKey).SelectMany(h => h.Value.ToArray()).ToArray(); @@ -119,7 +119,7 @@ public AndConstraint WithoutHeader(string unexpectedKey, str { var (filter, condition) = BuildFilterAndCondition(request => { - var headers = request.Headers?.ToArray() ?? new KeyValuePair>[0]; + var headers = request.Headers?.ToArray() ?? []; var matchingHeaderValues = headers.Where(h => h.Key == unexpectedKey).SelectMany(h => h.Value.ToArray()).ToArray(); diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithProxy.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithProxy.cs index b820b0a62..e2836783c 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithProxy.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.WithProxy.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System; diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.cs index b59181b09..3083fae12 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockAssertions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System; using System.Collections.Generic; diff --git a/src/WireMock.Net.FluentAssertions/Assertions/WireMockReceivedAssertions.cs b/src/WireMock.Net.FluentAssertions/Assertions/WireMockReceivedAssertions.cs index a9c19a40b..63f4230a0 100644 --- a/src/WireMock.Net.FluentAssertions/Assertions/WireMockReceivedAssertions.cs +++ b/src/WireMock.Net.FluentAssertions/Assertions/WireMockReceivedAssertions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions.Primitives; using WireMock.Server; diff --git a/src/WireMock.Net.FluentAssertions/Extensions/WireMockExtensions.cs b/src/WireMock.Net.FluentAssertions/Extensions/WireMockExtensions.cs index c0593d4f5..01cf10f87 100644 --- a/src/WireMock.Net.FluentAssertions/Extensions/WireMockExtensions.cs +++ b/src/WireMock.Net.FluentAssertions/Extensions/WireMockExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Server; // ReSharper disable once CheckNamespace diff --git a/src/WireMock.Net.FluentAssertions/Usings.cs b/src/WireMock.Net.FluentAssertions/Usings.cs index 8999d126d..82139e4fe 100644 --- a/src/WireMock.Net.FluentAssertions/Usings.cs +++ b/src/WireMock.Net.FluentAssertions/Usings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + global using System.Linq; global using FluentAssertions; global using FluentAssertions.Execution; \ No newline at end of file diff --git a/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj b/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj index 578137668..c8d403720 100644 --- a/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj +++ b/src/WireMock.Net.FluentAssertions/WireMock.Net.FluentAssertions.csproj @@ -22,18 +22,12 @@ true MIT - 11 true - - - - - diff --git a/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs b/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs index 90dcd3bc7..28d1b1fb4 100644 --- a/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs +++ b/src/WireMock.Net.Matchers.CSharpCode/Matchers/CSharpCodeMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Reflection; @@ -144,24 +146,24 @@ private bool IsMatch(dynamic input, string pattern) } } #elif (NET46 || NET461) - dynamic script; - try - { - script = CSScriptLibrary.CSScript.Evaluator.CompileCode(source).CreateObject("*"); - } - catch (Exception ex) - { - throw new WireMockException("CSharpCodeMatcher: Unable to create compiler for WireMock.CodeHelper", ex); - } - - try - { - result = script.IsMatch(inputValue); - } - catch (Exception ex) - { - throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper", ex); - } + dynamic script; + try + { + script = CSScriptLibrary.CSScript.Evaluator.CompileCode(source).CreateObject("*"); + } + catch (Exception ex) + { + throw new WireMockException("CSharpCodeMatcher: Unable to create compiler for WireMock.CodeHelper", ex); + } + + try + { + result = script.IsMatch(inputValue); + } + catch (Exception ex) + { + throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper", ex); + } #elif (NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP3_1 || NET5_0_OR_GREATER) Assembly assembly; @@ -193,7 +195,7 @@ private bool IsMatch(dynamic input, string pattern) throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper", ex); } #else - throw new NotSupportedException("The 'CSharpCodeMatcher' cannot be used in netstandard 1.3"); + throw new NotSupportedException("The 'CSharpCodeMatcher' cannot be used in netstandard 1.3"); #endif try { diff --git a/src/WireMock.Net.Matchers.CSharpCode/Properties/AssemblyInfo.cs b/src/WireMock.Net.Matchers.CSharpCode/Properties/AssemblyInfo.cs index 4f81246fa..f0e51cc60 100644 --- a/src/WireMock.Net.Matchers.CSharpCode/Properties/AssemblyInfo.cs +++ b/src/WireMock.Net.Matchers.CSharpCode/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Runtime.CompilerServices; +// Copyright © WireMock.Net + +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("WireMock.Net.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e138ec44d93acac565953052636eb8d5e7e9f27ddb030590055cd1a0ab2069a5623f1f77ca907d78e0b37066ca0f6d63da7eecc3fcb65b76aa8ebeccf7ebe1d11264b8404cd9b1cbbf2c83f566e033b3e54129f6ef28daffff776ba7aebbc53c0d635ebad8f45f78eb3f7e0459023c218f003416e080f96a1a3c5ffeb56bee9e")] diff --git a/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj b/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj index 97440b252..4cd59a086 100644 --- a/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj +++ b/src/WireMock.Net.Matchers.CSharpCode/WireMock.Net.Matchers.CSharpCode.csproj @@ -31,9 +31,6 @@ - - - diff --git a/src/WireMock.Net.OpenApiParser/Extensions/DictionaryExtensions.cs b/src/WireMock.Net.OpenApiParser/Extensions/DictionaryExtensions.cs index d81e7aa35..8034318e5 100644 --- a/src/WireMock.Net.OpenApiParser/Extensions/DictionaryExtensions.cs +++ b/src/WireMock.Net.OpenApiParser/Extensions/DictionaryExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if NET46 || NETSTANDARD2_0 using System.Collections.Generic; diff --git a/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs b/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs index 405a282e2..e44b0afc8 100644 --- a/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs +++ b/src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Interfaces; using Microsoft.OpenApi.Models; diff --git a/src/WireMock.Net.OpenApiParser/Extensions/WireMockServerExtensions.cs b/src/WireMock.Net.OpenApiParser/Extensions/WireMockServerExtensions.cs index cba9daec0..b2aadb06b 100644 --- a/src/WireMock.Net.OpenApiParser/Extensions/WireMockServerExtensions.cs +++ b/src/WireMock.Net.OpenApiParser/Extensions/WireMockServerExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Linq; using JetBrains.Annotations; diff --git a/src/WireMock.Net.OpenApiParser/IWireMockOpenApiParser.cs b/src/WireMock.Net.OpenApiParser/IWireMockOpenApiParser.cs index c85304d83..e54ded9f2 100644 --- a/src/WireMock.Net.OpenApiParser/IWireMockOpenApiParser.cs +++ b/src/WireMock.Net.OpenApiParser/IWireMockOpenApiParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.IO; using Microsoft.OpenApi.Models; diff --git a/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs b/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs index 26049125e..a22f61254 100644 --- a/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs +++ b/src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs b/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs index a9f395e1b..1d99b9ff6 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Microsoft.OpenApi.Models; diff --git a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs index 24afc40c1..e179981c3 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Microsoft.OpenApi.Models; using RandomDataGenerator.FieldOptions; diff --git a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs index 2e1cfb745..f5e7f03ec 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Microsoft.OpenApi.Models; diff --git a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserSettings.cs b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserSettings.cs index cb91f8461..c5cae99e1 100644 --- a/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserSettings.cs +++ b/src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Net.OpenApiParser.Types; namespace WireMock.Net.OpenApiParser.Settings; diff --git a/src/WireMock.Net.OpenApiParser/Types/ExampleValueType.cs b/src/WireMock.Net.OpenApiParser/Types/ExampleValueType.cs index aabbfca94..98856b3a7 100644 --- a/src/WireMock.Net.OpenApiParser/Types/ExampleValueType.cs +++ b/src/WireMock.Net.OpenApiParser/Types/ExampleValueType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Net.OpenApiParser.Types; /// diff --git a/src/WireMock.Net.OpenApiParser/Types/SchemaFormat.cs b/src/WireMock.Net.OpenApiParser/Types/SchemaFormat.cs index 0924ed246..c53702385 100644 --- a/src/WireMock.Net.OpenApiParser/Types/SchemaFormat.cs +++ b/src/WireMock.Net.OpenApiParser/Types/SchemaFormat.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Net.OpenApiParser.Types; internal enum SchemaFormat diff --git a/src/WireMock.Net.OpenApiParser/Types/SchemaType.cs b/src/WireMock.Net.OpenApiParser/Types/SchemaType.cs index 7ccb46bf2..4b5df64d5 100644 --- a/src/WireMock.Net.OpenApiParser/Types/SchemaType.cs +++ b/src/WireMock.Net.OpenApiParser/Types/SchemaType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Net.OpenApiParser.Types; internal enum SchemaType diff --git a/src/WireMock.Net.OpenApiParser/Utils/DateTimeUtils.cs b/src/WireMock.Net.OpenApiParser/Utils/DateTimeUtils.cs index dbd5d52cf..c0108295d 100644 --- a/src/WireMock.Net.OpenApiParser/Utils/DateTimeUtils.cs +++ b/src/WireMock.Net.OpenApiParser/Utils/DateTimeUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Globalization; diff --git a/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs b/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs index 9edde43d3..4039a3587 100644 --- a/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs +++ b/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; diff --git a/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj b/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj index dcb94d40b..21d0eb7c3 100644 --- a/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj +++ b/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj @@ -12,7 +12,6 @@ ../WireMock.Net/WireMock.Net.snk true MIT - 10 @@ -27,8 +26,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - diff --git a/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs b/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs index 3dacce7e2..782457ca1 100644 --- a/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs +++ b/src/WireMock.Net.OpenApiParser/WireMockOpenApiParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.IO; diff --git a/src/WireMock.Net.RestClient/Builders/ApiMappingModelBuilder.cs b/src/WireMock.Net.RestClient/Builders/ApiMappingModelBuilder.cs index 8084819b0..1e3a81b49 100644 --- a/src/WireMock.Net.RestClient/Builders/ApiMappingModelBuilder.cs +++ b/src/WireMock.Net.RestClient/Builders/ApiMappingModelBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Threading; diff --git a/src/WireMock.Net.RestClient/Extensions/ResponseModelBuilderExtensions.cs b/src/WireMock.Net.RestClient/Extensions/ResponseModelBuilderExtensions.cs index b75535508..b9a8a091a 100644 --- a/src/WireMock.Net.RestClient/Extensions/ResponseModelBuilderExtensions.cs +++ b/src/WireMock.Net.RestClient/Extensions/ResponseModelBuilderExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Text; using JsonConverter.Abstractions; using JsonConverter.Newtonsoft.Json; diff --git a/src/WireMock.Net.RestClient/Extensions/WireMockAdminApiExtensions.cs b/src/WireMock.Net.RestClient/Extensions/WireMockAdminApiExtensions.cs index a55dbcffe..024011f45 100644 --- a/src/WireMock.Net.RestClient/Extensions/WireMockAdminApiExtensions.cs +++ b/src/WireMock.Net.RestClient/Extensions/WireMockAdminApiExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Net.Http.Headers; using System.Text; diff --git a/src/WireMock.Net.RestClient/IWireMockAdminApi.cs b/src/WireMock.Net.RestClient/IWireMockAdminApi.cs index 4de6622b6..17063f00e 100644 --- a/src/WireMock.Net.RestClient/IWireMockAdminApi.cs +++ b/src/WireMock.Net.RestClient/IWireMockAdminApi.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Net.Http.Headers; diff --git a/src/WireMock.Net.RestClient/WireMock.Net.RestClient.csproj b/src/WireMock.Net.RestClient/WireMock.Net.RestClient.csproj index 84295df1e..0a025845a 100644 --- a/src/WireMock.Net.RestClient/WireMock.Net.RestClient.csproj +++ b/src/WireMock.Net.RestClient/WireMock.Net.RestClient.csproj @@ -31,7 +31,6 @@ - diff --git a/src/WireMock.Net.StandAlone/Properties/AssemblyInfo.cs b/src/WireMock.Net.StandAlone/Properties/AssemblyInfo.cs index ee5b32150..bbd523ba8 100644 --- a/src/WireMock.Net.StandAlone/Properties/AssemblyInfo.cs +++ b/src/WireMock.Net.StandAlone/Properties/AssemblyInfo.cs @@ -1,4 +1,6 @@ -using System.Runtime.CompilerServices; +// Copyright © WireMock.Net + +using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("WireMock.Net.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e138ec44d93acac565953052636eb8d5e7e9f27ddb030590055cd1a0ab2069a5623f1f77ca907d78e0b37066ca0f6d63da7eecc3fcb65b76aa8ebeccf7ebe1d11264b8404cd9b1cbbf2c83f566e033b3e54129f6ef28daffff776ba7aebbc53c0d635ebad8f45f78eb3f7e0459023c218f003416e080f96a1a3c5ffeb56bee9e")] diff --git a/src/WireMock.Net.StandAlone/StandAloneApp.cs b/src/WireMock.Net.StandAlone/StandAloneApp.cs index 98417683c..54889d809 100644 --- a/src/WireMock.Net.StandAlone/StandAloneApp.cs +++ b/src/WireMock.Net.StandAlone/StandAloneApp.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Diagnostics.CodeAnalysis; using System.Linq; diff --git a/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj b/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj index 82e6a675d..b4ebcd228 100644 --- a/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj +++ b/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj @@ -35,11 +35,6 @@ USE_ASPNETCORE;NET46 - - - - - diff --git a/src/WireMock.Net.Testcontainers/Models/ContainerInfo.cs b/src/WireMock.Net.Testcontainers/Models/ContainerInfo.cs index f30110690..64a1f86e9 100644 --- a/src/WireMock.Net.Testcontainers/Models/ContainerInfo.cs +++ b/src/WireMock.Net.Testcontainers/Models/ContainerInfo.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Net.Testcontainers.Models; internal record ContainerInfo diff --git a/src/WireMock.Net.Testcontainers/WireMock.Net.Testcontainers.csproj b/src/WireMock.Net.Testcontainers/WireMock.Net.Testcontainers.csproj index 2e208e2b6..a23b5095e 100644 --- a/src/WireMock.Net.Testcontainers/WireMock.Net.Testcontainers.csproj +++ b/src/WireMock.Net.Testcontainers/WireMock.Net.Testcontainers.csproj @@ -12,7 +12,6 @@ ../WireMock.Net/WireMock.Net.snk true MIT - 10 @@ -30,7 +29,6 @@ - diff --git a/src/WireMock.Net.Testcontainers/WireMockConfiguration.cs b/src/WireMock.Net.Testcontainers/WireMockConfiguration.cs index 56a91f7e8..5e4a6767c 100644 --- a/src/WireMock.Net.Testcontainers/WireMockConfiguration.cs +++ b/src/WireMock.Net.Testcontainers/WireMockConfiguration.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Docker.DotNet.Models; using DotNet.Testcontainers.Builders; using DotNet.Testcontainers.Configurations; diff --git a/src/WireMock.Net.Testcontainers/WireMockContainer.cs b/src/WireMock.Net.Testcontainers/WireMockContainer.cs index 696ac0981..cd1452348 100644 --- a/src/WireMock.Net.Testcontainers/WireMockContainer.cs +++ b/src/WireMock.Net.Testcontainers/WireMockContainer.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Net.Http; using System.Net.Http.Headers; diff --git a/src/WireMock.Net.Testcontainers/WireMockContainerBuilder.cs b/src/WireMock.Net.Testcontainers/WireMockContainerBuilder.cs index f164d42d7..f7a719923 100644 --- a/src/WireMock.Net.Testcontainers/WireMockContainerBuilder.cs +++ b/src/WireMock.Net.Testcontainers/WireMockContainerBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Threading.Tasks; diff --git a/src/WireMock.Net.xUnit/TestOutputHelperWireMockLogger.cs b/src/WireMock.Net.xUnit/TestOutputHelperWireMockLogger.cs index e084fa82c..51570e8e3 100644 --- a/src/WireMock.Net.xUnit/TestOutputHelperWireMockLogger.cs +++ b/src/WireMock.Net.xUnit/TestOutputHelperWireMockLogger.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Newtonsoft.Json; using Stef.Validation; diff --git a/src/WireMock.Net.xUnit/WireMock.Net.xUnit.csproj b/src/WireMock.Net.xUnit/WireMock.Net.xUnit.csproj index 44a37001c..e0162f4c2 100644 --- a/src/WireMock.Net.xUnit/WireMock.Net.xUnit.csproj +++ b/src/WireMock.Net.xUnit/WireMock.Net.xUnit.csproj @@ -25,7 +25,6 @@ - diff --git a/src/WireMock.Net/Authentication/AzureADAuthenticationMatcher.cs b/src/WireMock.Net/Authentication/AzureADAuthenticationMatcher.cs index 74caa2959..4832fe7ff 100644 --- a/src/WireMock.Net/Authentication/AzureADAuthenticationMatcher.cs +++ b/src/WireMock.Net/Authentication/AzureADAuthenticationMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !NETSTANDARD1_3 using System; using System.Globalization; diff --git a/src/WireMock.Net/Authentication/BasicAuthenticationMatcher.cs b/src/WireMock.Net/Authentication/BasicAuthenticationMatcher.cs index d80a0360f..c2b5aa0f3 100644 --- a/src/WireMock.Net/Authentication/BasicAuthenticationMatcher.cs +++ b/src/WireMock.Net/Authentication/BasicAuthenticationMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text; using WireMock.Matchers; diff --git a/src/WireMock.Net/Compatibility/EmptyArray.cs b/src/WireMock.Net/Compatibility/EmptyArray.cs index 125e2212a..686343cdf 100644 --- a/src/WireMock.Net/Compatibility/EmptyArray.cs +++ b/src/WireMock.Net/Compatibility/EmptyArray.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // ReSharper disable once CheckNamespace namespace System; diff --git a/src/WireMock.Net/Compatibility/StringExtensions.cs b/src/WireMock.Net/Compatibility/StringExtensions.cs index 63426786e..4b42e4d32 100644 --- a/src/WireMock.Net/Compatibility/StringExtensions.cs +++ b/src/WireMock.Net/Compatibility/StringExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if NET451 || NET452 || NET46 || NET451 || NET461 || NETSTANDARD1_3 || NETSTANDARD2_0 using System.Text.RegularExpressions; diff --git a/src/WireMock.Net/Compatibility/WebProxy.cs b/src/WireMock.Net/Compatibility/WebProxy.cs index dcff2b073..157a50b16 100644 --- a/src/WireMock.Net/Compatibility/WebProxy.cs +++ b/src/WireMock.Net/Compatibility/WebProxy.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if NETSTANDARD1_3 // ReSharper disable once CheckNamespace diff --git a/src/WireMock.Net/Constants/WireMockConstants.cs b/src/WireMock.Net/Constants/WireMockConstants.cs index f75894513..9dea909af 100644 --- a/src/WireMock.Net/Constants/WireMockConstants.cs +++ b/src/WireMock.Net/Constants/WireMockConstants.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Constants; internal static class WireMockConstants diff --git a/src/WireMock.Net/Exceptions/WireMockException.cs b/src/WireMock.Net/Exceptions/WireMockException.cs index 5c14ec33c..ce68e8cfc 100644 --- a/src/WireMock.Net/Exceptions/WireMockException.cs +++ b/src/WireMock.Net/Exceptions/WireMockException.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Exceptions; diff --git a/src/WireMock.Net/Extensions/AnyOfExtensions.cs b/src/WireMock.Net/Extensions/AnyOfExtensions.cs index 2a580227f..a97adb38d 100644 --- a/src/WireMock.Net/Extensions/AnyOfExtensions.cs +++ b/src/WireMock.Net/Extensions/AnyOfExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using AnyOfTypes; diff --git a/src/WireMock.Net/Extensions/DictionaryExtensions.cs b/src/WireMock.Net/Extensions/DictionaryExtensions.cs index 600a8aa17..b80c61053 100644 --- a/src/WireMock.Net/Extensions/DictionaryExtensions.cs +++ b/src/WireMock.Net/Extensions/DictionaryExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections; using System.Diagnostics.CodeAnalysis; using Stef.Validation; diff --git a/src/WireMock.Net/Extensions/EnumExtensions.cs b/src/WireMock.Net/Extensions/EnumExtensions.cs index a407f16c5..e2ea842df 100644 --- a/src/WireMock.Net/Extensions/EnumExtensions.cs +++ b/src/WireMock.Net/Extensions/EnumExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Reflection; diff --git a/src/WireMock.Net/Extensions/ExceptionExtensions.cs b/src/WireMock.Net/Extensions/ExceptionExtensions.cs index e4752ebd5..4604d49a6 100644 --- a/src/WireMock.Net/Extensions/ExceptionExtensions.cs +++ b/src/WireMock.Net/Extensions/ExceptionExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Extensions; diff --git a/src/WireMock.Net/Extensions/TimeSettingsExtensions.cs b/src/WireMock.Net/Extensions/TimeSettingsExtensions.cs index 250aeca21..04cb8a5df 100644 --- a/src/WireMock.Net/Extensions/TimeSettingsExtensions.cs +++ b/src/WireMock.Net/Extensions/TimeSettingsExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Models; diff --git a/src/WireMock.Net/Handlers/LocalFileSystemHandler.cs b/src/WireMock.Net/Handlers/LocalFileSystemHandler.cs index 09521cb59..4c206cc14 100644 --- a/src/WireMock.Net/Handlers/LocalFileSystemHandler.cs +++ b/src/WireMock.Net/Handlers/LocalFileSystemHandler.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.IO; using WireMock.Util; @@ -72,8 +74,8 @@ public virtual string ReadMappingFile(string path) /// public virtual void WriteMappingFile(string path, string text) { - Guard.NotNullOrEmpty(path, nameof(path)); - Guard.NotNull(text, nameof(text)); + Guard.NotNullOrEmpty(path); + Guard.NotNull(text); File.WriteAllText(path, text); } @@ -144,7 +146,7 @@ public virtual byte[] ReadFile(string filename) /// public virtual string ReadFileAsString(string filename) { - return File.ReadAllText(AdjustPathForMappingFolder(Guard.NotNullOrEmpty(filename, nameof(filename)))); + return File.ReadAllText(AdjustPathForMappingFolder(Guard.NotNullOrEmpty(filename))); } /// diff --git a/src/WireMock.Net/Http/ByteArrayContentHelper.cs b/src/WireMock.Net/Http/ByteArrayContentHelper.cs index c0c5ae66e..339532e1d 100644 --- a/src/WireMock.Net/Http/ByteArrayContentHelper.cs +++ b/src/WireMock.Net/Http/ByteArrayContentHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net.Http; using System.Net.Http.Headers; using Stef.Validation; diff --git a/src/WireMock.Net/Http/HttpClientBuilder.cs b/src/WireMock.Net/Http/HttpClientBuilder.cs index ab8fe8193..275b7b576 100644 --- a/src/WireMock.Net/Http/HttpClientBuilder.cs +++ b/src/WireMock.Net/Http/HttpClientBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net; using System.Net.Http; using WireMock.HttpsCertificate; diff --git a/src/WireMock.Net/Http/HttpClientFactory2.cs b/src/WireMock.Net/Http/HttpClientFactory2.cs index 9dd71ada2..000e79a83 100644 --- a/src/WireMock.Net/Http/HttpClientFactory2.cs +++ b/src/WireMock.Net/Http/HttpClientFactory2.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using System.Net.Http; diff --git a/src/WireMock.Net/Http/HttpKnownHeaderNames.cs b/src/WireMock.Net/Http/HttpKnownHeaderNames.cs index 10e23867e..955308c84 100644 --- a/src/WireMock.Net/Http/HttpKnownHeaderNames.cs +++ b/src/WireMock.Net/Http/HttpKnownHeaderNames.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. diff --git a/src/WireMock.Net/Http/HttpRequestMessageHelper.cs b/src/WireMock.Net/Http/HttpRequestMessageHelper.cs index b2ec4d9ae..23619bef0 100644 --- a/src/WireMock.Net/Http/HttpRequestMessageHelper.cs +++ b/src/WireMock.Net/Http/HttpRequestMessageHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Http/HttpResponseMessageHelper.cs b/src/WireMock.Net/Http/HttpResponseMessageHelper.cs index 8d0e7090e..4ed30968d 100644 --- a/src/WireMock.Net/Http/HttpResponseMessageHelper.cs +++ b/src/WireMock.Net/Http/HttpResponseMessageHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Http/StringContentHelper.cs b/src/WireMock.Net/Http/StringContentHelper.cs index a5c5dee99..1bc518fa2 100644 --- a/src/WireMock.Net/Http/StringContentHelper.cs +++ b/src/WireMock.Net/Http/StringContentHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net.Http; using System.Net.Http.Headers; using Stef.Validation; diff --git a/src/WireMock.Net/Http/WebhookSender.cs b/src/WireMock.Net/Http/WebhookSender.cs index 25aaebe5f..95947e45d 100644 --- a/src/WireMock.Net/Http/WebhookSender.cs +++ b/src/WireMock.Net/Http/WebhookSender.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/HttpsCertificate/CertificateLoader.cs b/src/WireMock.Net/HttpsCertificate/CertificateLoader.cs index 7fef03f31..3e0a97d64 100644 --- a/src/WireMock.Net/HttpsCertificate/CertificateLoader.cs +++ b/src/WireMock.Net/HttpsCertificate/CertificateLoader.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using System.Security.Cryptography.X509Certificates; diff --git a/src/WireMock.Net/HttpsCertificate/PublicCertificateHelper.cs b/src/WireMock.Net/HttpsCertificate/PublicCertificateHelper.cs index a47630af7..a65b68737 100644 --- a/src/WireMock.Net/HttpsCertificate/PublicCertificateHelper.cs +++ b/src/WireMock.Net/HttpsCertificate/PublicCertificateHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Security.Cryptography.X509Certificates; diff --git a/src/WireMock.Net/IMapping.cs b/src/WireMock.Net/IMapping.cs index b052dd4fe..671029989 100644 --- a/src/WireMock.Net/IMapping.cs +++ b/src/WireMock.Net/IMapping.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/IMappingBuilder.cs b/src/WireMock.Net/IMappingBuilder.cs index 506186903..0df6a7569 100644 --- a/src/WireMock.Net/IMappingBuilder.cs +++ b/src/WireMock.Net/IMappingBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Admin.Mappings; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/Json/DynamicJsonClassOptions.cs b/src/WireMock.Net/Json/DynamicJsonClassOptions.cs index 6d090b3d5..09fd222bb 100644 --- a/src/WireMock.Net/Json/DynamicJsonClassOptions.cs +++ b/src/WireMock.Net/Json/DynamicJsonClassOptions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // Copied from https://github.com/Handlebars-Net/Handlebars.Net.Helpers/blob/master/src/Handlebars.Net.Helpers.DynamicLinq namespace WireMock.Json; diff --git a/src/WireMock.Net/Json/DynamicPropertyWithValue.cs b/src/WireMock.Net/Json/DynamicPropertyWithValue.cs index 9cf2bd692..21b0b23d9 100644 --- a/src/WireMock.Net/Json/DynamicPropertyWithValue.cs +++ b/src/WireMock.Net/Json/DynamicPropertyWithValue.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // Copied from https://github.com/Handlebars-Net/Handlebars.Net.Helpers/blob/master/src/Handlebars.Net.Helpers.DynamicLinq using System.Linq.Dynamic.Core; diff --git a/src/WireMock.Net/Json/FloatBehavior.cs b/src/WireMock.Net/Json/FloatBehavior.cs index 0bfa8100d..136533388 100644 --- a/src/WireMock.Net/Json/FloatBehavior.cs +++ b/src/WireMock.Net/Json/FloatBehavior.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // Copied from https://github.com/Handlebars-Net/Handlebars.Net.Helpers/blob/master/src/Handlebars.Net.Helpers.DynamicLinq namespace WireMock.Json; diff --git a/src/WireMock.Net/Json/IntegerBehavior.cs b/src/WireMock.Net/Json/IntegerBehavior.cs index 6258abfcc..97df9070b 100644 --- a/src/WireMock.Net/Json/IntegerBehavior.cs +++ b/src/WireMock.Net/Json/IntegerBehavior.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // Copied from https://github.com/Handlebars-Net/Handlebars.Net.Helpers/blob/master/src/Handlebars.Net.Helpers.DynamicLinq namespace WireMock.Json; diff --git a/src/WireMock.Net/Json/JObjectExtensions.cs b/src/WireMock.Net/Json/JObjectExtensions.cs index 5771fd5b7..0d0c40ae1 100644 --- a/src/WireMock.Net/Json/JObjectExtensions.cs +++ b/src/WireMock.Net/Json/JObjectExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + // Copied from https://github.com/Handlebars-Net/Handlebars.Net.Helpers/blob/master/src/Handlebars.Net.Helpers.DynamicLinq using System; diff --git a/src/WireMock.Net/Logging/LogEntry.cs b/src/WireMock.Net/Logging/LogEntry.cs index a5b556d1a..b00b83c20 100644 --- a/src/WireMock.Net/Logging/LogEntry.cs +++ b/src/WireMock.Net/Logging/LogEntry.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/Logging/WireMockConsoleLogger.cs b/src/WireMock.Net/Logging/WireMockConsoleLogger.cs index ba9af4c01..37b6b3cea 100644 --- a/src/WireMock.Net/Logging/WireMockConsoleLogger.cs +++ b/src/WireMock.Net/Logging/WireMockConsoleLogger.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Newtonsoft.Json; using System; using WireMock.Admin.Requests; @@ -19,7 +21,10 @@ public WireMockConsoleLogger() { Console.OutputEncoding = System.Text.Encoding.UTF8; } - catch { } + catch + { + // Ignored + } } /// diff --git a/src/WireMock.Net/Logging/WireMockNullLogger.cs b/src/WireMock.Net/Logging/WireMockNullLogger.cs index 21df995c6..3db1d186a 100644 --- a/src/WireMock.Net/Logging/WireMockNullLogger.cs +++ b/src/WireMock.Net/Logging/WireMockNullLogger.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Admin.Requests; diff --git a/src/WireMock.Net/Mapping.cs b/src/WireMock.Net/Mapping.cs index dd9c2b4de..ff97f8b71 100644 --- a/src/WireMock.Net/Mapping.cs +++ b/src/WireMock.Net/Mapping.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Stef.Validation; diff --git a/src/WireMock.Net/MappingBuilder.cs b/src/WireMock.Net/MappingBuilder.cs index 8103ba2a0..d2d95419c 100644 --- a/src/WireMock.Net/MappingBuilder.cs +++ b/src/WireMock.Net/MappingBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Text; diff --git a/src/WireMock.Net/MappingRegistrationCallback.cs b/src/WireMock.Net/MappingRegistrationCallback.cs index 0a78d11a5..93ec84a7b 100644 --- a/src/WireMock.Net/MappingRegistrationCallback.cs +++ b/src/WireMock.Net/MappingRegistrationCallback.cs @@ -1,4 +1,6 @@ -namespace WireMock +// Copyright © WireMock.Net + +namespace WireMock { /// /// The registration callback. diff --git a/src/WireMock.Net/Matchers/AbstractJsonPartialMatcher.cs b/src/WireMock.Net/Matchers/AbstractJsonPartialMatcher.cs index 1cbdd6df6..f34494583 100644 --- a/src/WireMock.Net/Matchers/AbstractJsonPartialMatcher.cs +++ b/src/WireMock.Net/Matchers/AbstractJsonPartialMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using Newtonsoft.Json.Linq; diff --git a/src/WireMock.Net/Matchers/ContentTypeMatcher.cs b/src/WireMock.Net/Matchers/ContentTypeMatcher.cs index 7aa7263a0..2efdadc20 100644 --- a/src/WireMock.Net/Matchers/ContentTypeMatcher.cs +++ b/src/WireMock.Net/Matchers/ContentTypeMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net.Http.Headers; using AnyOfTypes; using WireMock.Models; diff --git a/src/WireMock.Net/Matchers/ExactMatcher.cs b/src/WireMock.Net/Matchers/ExactMatcher.cs index 0c6580fef..d72eae420 100644 --- a/src/WireMock.Net/Matchers/ExactMatcher.cs +++ b/src/WireMock.Net/Matchers/ExactMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using AnyOfTypes; diff --git a/src/WireMock.Net/Matchers/ExactObjectMatcher.cs b/src/WireMock.Net/Matchers/ExactObjectMatcher.cs index ea5bbbff1..5150903fc 100644 --- a/src/WireMock.Net/Matchers/ExactObjectMatcher.cs +++ b/src/WireMock.Net/Matchers/ExactObjectMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using Stef.Validation; diff --git a/src/WireMock.Net/Matchers/GraphQLMatcher.cs b/src/WireMock.Net/Matchers/GraphQLMatcher.cs index fb3b1567e..49e72d92f 100644 --- a/src/WireMock.Net/Matchers/GraphQLMatcher.cs +++ b/src/WireMock.Net/Matchers/GraphQLMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if GRAPHQL using System; using System.Collections.Generic; diff --git a/src/WireMock.Net/Matchers/Helpers/BodyDataMatchScoreCalculator.cs b/src/WireMock.Net/Matchers/Helpers/BodyDataMatchScoreCalculator.cs index 57565c46c..bd660cf6a 100644 --- a/src/WireMock.Net/Matchers/Helpers/BodyDataMatchScoreCalculator.cs +++ b/src/WireMock.Net/Matchers/Helpers/BodyDataMatchScoreCalculator.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Stef.Validation; using WireMock.Types; using WireMock.Util; @@ -10,9 +12,14 @@ public static MatchResult CalculateMatchScore(IBodyData? requestMessage, IMatche { Guard.NotNull(matcher); + if (requestMessage == null) + { + return default; + } + if (matcher is NotNullOrEmptyMatcher notNullOrEmptyMatcher) { - switch (requestMessage?.DetectedBodyType) + switch (requestMessage.DetectedBodyType) { case BodyType.Json: case BodyType.String: @@ -30,10 +37,10 @@ public static MatchResult CalculateMatchScore(IBodyData? requestMessage, IMatche if (matcher is ExactObjectMatcher exactObjectMatcher) { // If the body is a byte array, try to match. - var detectedBodyType = requestMessage?.DetectedBodyType; + var detectedBodyType = requestMessage.DetectedBodyType; if (detectedBodyType is BodyType.Bytes or BodyType.String or BodyType.FormUrlEncoded) { - return exactObjectMatcher.IsMatch(requestMessage?.BodyAsBytes); + return exactObjectMatcher.IsMatch(requestMessage.BodyAsBytes); } } @@ -41,26 +48,22 @@ public static MatchResult CalculateMatchScore(IBodyData? requestMessage, IMatche if (matcher is IObjectMatcher objectMatcher) { // If the body is a JSON object, try to match. - if (requestMessage?.DetectedBodyType == BodyType.Json) + if (requestMessage.DetectedBodyType == BodyType.Json) { return objectMatcher.IsMatch(requestMessage.BodyAsJson); } // If the body is a byte array, try to match. - if (requestMessage?.DetectedBodyType == BodyType.Bytes) + if (requestMessage.DetectedBodyType == BodyType.Bytes) { return objectMatcher.IsMatch(requestMessage.BodyAsBytes); } } - // Check if the matcher is a IStringMatcher - if (matcher is IStringMatcher stringMatcher) + // In case the matcher is a IStringMatcher and If body is a Json or a String, use the BodyAsString to match on. + if (matcher is IStringMatcher stringMatcher && requestMessage.DetectedBodyType is BodyType.Json or BodyType.String or BodyType.FormUrlEncoded) { - // If the body is a Json or a String, use the BodyAsString to match on. - if (requestMessage?.DetectedBodyType is BodyType.Json or BodyType.String or BodyType.FormUrlEncoded) - { - return stringMatcher.IsMatch(requestMessage.BodyAsString); - } + return stringMatcher.IsMatch(requestMessage.BodyAsString); } return default; diff --git a/src/WireMock.Net/Matchers/IBytesMatcher.cs b/src/WireMock.Net/Matchers/IBytesMatcher.cs index 2870a1488..c7d105818 100644 --- a/src/WireMock.Net/Matchers/IBytesMatcher.cs +++ b/src/WireMock.Net/Matchers/IBytesMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading; using System.Threading.Tasks; diff --git a/src/WireMock.Net/Matchers/ICSharpCodeMatcher.cs b/src/WireMock.Net/Matchers/ICSharpCodeMatcher.cs index f49646d67..42abf986e 100644 --- a/src/WireMock.Net/Matchers/ICSharpCodeMatcher.cs +++ b/src/WireMock.Net/Matchers/ICSharpCodeMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/IDecodeMatcher.cs b/src/WireMock.Net/Matchers/IDecodeMatcher.cs index ffc520f82..e5bb0baf2 100644 --- a/src/WireMock.Net/Matchers/IDecodeMatcher.cs +++ b/src/WireMock.Net/Matchers/IDecodeMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading; using System.Threading.Tasks; diff --git a/src/WireMock.Net/Matchers/IIgnoreCaseMatcher.cs b/src/WireMock.Net/Matchers/IIgnoreCaseMatcher.cs index 3d069b010..60bba30b3 100644 --- a/src/WireMock.Net/Matchers/IIgnoreCaseMatcher.cs +++ b/src/WireMock.Net/Matchers/IIgnoreCaseMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/IJsonMatcher.cs b/src/WireMock.Net/Matchers/IJsonMatcher.cs index f2cc35bc4..bbea8792a 100644 --- a/src/WireMock.Net/Matchers/IJsonMatcher.cs +++ b/src/WireMock.Net/Matchers/IJsonMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/IMatcher.cs b/src/WireMock.Net/Matchers/IMatcher.cs index a07410281..eed89a45e 100644 --- a/src/WireMock.Net/Matchers/IMatcher.cs +++ b/src/WireMock.Net/Matchers/IMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/IObjectMatcher.cs b/src/WireMock.Net/Matchers/IObjectMatcher.cs index 8ed2b02f7..59b8d8a3a 100644 --- a/src/WireMock.Net/Matchers/IObjectMatcher.cs +++ b/src/WireMock.Net/Matchers/IObjectMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/IProtoBufMatcher.cs b/src/WireMock.Net/Matchers/IProtoBufMatcher.cs index 576ee9c15..9cd183ae0 100644 --- a/src/WireMock.Net/Matchers/IProtoBufMatcher.cs +++ b/src/WireMock.Net/Matchers/IProtoBufMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/IStringMatcher.cs b/src/WireMock.Net/Matchers/IStringMatcher.cs index f405b1985..bd0f6d515 100644 --- a/src/WireMock.Net/Matchers/IStringMatcher.cs +++ b/src/WireMock.Net/Matchers/IStringMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using AnyOfTypes; using WireMock.Models; diff --git a/src/WireMock.Net/Matchers/JSONPathMatcher.cs b/src/WireMock.Net/Matchers/JSONPathMatcher.cs index f1183fd06..ade517eda 100644 --- a/src/WireMock.Net/Matchers/JSONPathMatcher.cs +++ b/src/WireMock.Net/Matchers/JSONPathMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using AnyOfTypes; diff --git a/src/WireMock.Net/Matchers/JmesPathMatcher.cs b/src/WireMock.Net/Matchers/JmesPathMatcher.cs index f87c7a1ad..0f7627554 100644 --- a/src/WireMock.Net/Matchers/JmesPathMatcher.cs +++ b/src/WireMock.Net/Matchers/JmesPathMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using AnyOfTypes; diff --git a/src/WireMock.Net/Matchers/JsonMatcher.cs b/src/WireMock.Net/Matchers/JsonMatcher.cs index e1fbd3905..9a95e5574 100644 --- a/src/WireMock.Net/Matchers/JsonMatcher.cs +++ b/src/WireMock.Net/Matchers/JsonMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/JsonPartialMatcher.cs b/src/WireMock.Net/Matchers/JsonPartialMatcher.cs index eb0afe9c5..8b95691a9 100644 --- a/src/WireMock.Net/Matchers/JsonPartialMatcher.cs +++ b/src/WireMock.Net/Matchers/JsonPartialMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/JsonPartialWildCardMatcher.cs b/src/WireMock.Net/Matchers/JsonPartialWildCardMatcher.cs index 09f777e8d..109a6c72e 100644 --- a/src/WireMock.Net/Matchers/JsonPartialWildCardMatcher.cs +++ b/src/WireMock.Net/Matchers/JsonPartialWildCardMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/LinqMatcher.cs b/src/WireMock.Net/Matchers/LinqMatcher.cs index 6fdf88a8e..488e2c38f 100644 --- a/src/WireMock.Net/Matchers/LinqMatcher.cs +++ b/src/WireMock.Net/Matchers/LinqMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Linq.Dynamic.Core; diff --git a/src/WireMock.Net/Matchers/MatchBehaviour.cs b/src/WireMock.Net/Matchers/MatchBehaviour.cs index 6235c5ee7..1c8fda307 100644 --- a/src/WireMock.Net/Matchers/MatchBehaviour.cs +++ b/src/WireMock.Net/Matchers/MatchBehaviour.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/MatchBehaviourHelper.cs b/src/WireMock.Net/Matchers/MatchBehaviourHelper.cs index 12e4864b1..bd7975d3f 100644 --- a/src/WireMock.Net/Matchers/MatchBehaviourHelper.cs +++ b/src/WireMock.Net/Matchers/MatchBehaviourHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; internal static class MatchBehaviourHelper diff --git a/src/WireMock.Net/Matchers/MatchOperator.cs b/src/WireMock.Net/Matchers/MatchOperator.cs index 50aaced8b..9e4c306b8 100644 --- a/src/WireMock.Net/Matchers/MatchOperator.cs +++ b/src/WireMock.Net/Matchers/MatchOperator.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers; /// diff --git a/src/WireMock.Net/Matchers/MatchResult.cs b/src/WireMock.Net/Matchers/MatchResult.cs index a350d7d70..5419c1ab2 100644 --- a/src/WireMock.Net/Matchers/MatchResult.cs +++ b/src/WireMock.Net/Matchers/MatchResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/MatchScores.cs b/src/WireMock.Net/Matchers/MatchScores.cs index 82362a93f..deeca2d8b 100644 --- a/src/WireMock.Net/Matchers/MatchScores.cs +++ b/src/WireMock.Net/Matchers/MatchScores.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/MimePartMatcher.cs b/src/WireMock.Net/Matchers/MimePartMatcher.cs index 145052826..926cc1c39 100644 --- a/src/WireMock.Net/Matchers/MimePartMatcher.cs +++ b/src/WireMock.Net/Matchers/MimePartMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if MIMEKIT using System; using MimeKit; diff --git a/src/WireMock.Net/Matchers/Models/WireMockCustomScalarGraphType.cs b/src/WireMock.Net/Matchers/Models/WireMockCustomScalarGraphType.cs index 44d8bd7fa..a600cebd6 100644 --- a/src/WireMock.Net/Matchers/Models/WireMockCustomScalarGraphType.cs +++ b/src/WireMock.Net/Matchers/Models/WireMockCustomScalarGraphType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if GRAPHQL using System; using GraphQL.Types; diff --git a/src/WireMock.Net/Matchers/NotNullOrEmptyMatcher.cs b/src/WireMock.Net/Matchers/NotNullOrEmptyMatcher.cs index 7c746a863..a9e7d0ead 100644 --- a/src/WireMock.Net/Matchers/NotNullOrEmptyMatcher.cs +++ b/src/WireMock.Net/Matchers/NotNullOrEmptyMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using AnyOfTypes; diff --git a/src/WireMock.Net/Matchers/ProtoBufMatcher.cs b/src/WireMock.Net/Matchers/ProtoBufMatcher.cs index 45a221844..30257a7df 100644 --- a/src/WireMock.Net/Matchers/ProtoBufMatcher.cs +++ b/src/WireMock.Net/Matchers/ProtoBufMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if PROTOBUF using System; using System.Threading; diff --git a/src/WireMock.Net/Matchers/RegexMatcher.cs b/src/WireMock.Net/Matchers/RegexMatcher.cs index 67c6fdf34..7e717e6c8 100644 --- a/src/WireMock.Net/Matchers/RegexMatcher.cs +++ b/src/WireMock.Net/Matchers/RegexMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Text.RegularExpressions; diff --git a/src/WireMock.Net/Matchers/Request/CompositeMatcherType.cs b/src/WireMock.Net/Matchers/Request/CompositeMatcherType.cs index 408ecf97c..3a94e932a 100644 --- a/src/WireMock.Net/Matchers/Request/CompositeMatcherType.cs +++ b/src/WireMock.Net/Matchers/Request/CompositeMatcherType.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers.Request; /// diff --git a/src/WireMock.Net/Matchers/Request/RequestMatchResult.cs b/src/WireMock.Net/Matchers/Request/RequestMatchResult.cs index ac83a3fdc..8342853fe 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMatchResult.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMatchResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageBodyMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageBodyMatcher.cs index f276da471..5db7a9aea 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageBodyMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageBodyMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageClientIPMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageClientIPMatcher.cs index cafad3ca3..78d531fa5 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageClientIPMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageClientIPMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageCompositeMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageCompositeMatcher.cs index 12cbe721b..b6c25a997 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageCompositeMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageCompositeMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using Stef.Validation; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageCookieMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageCookieMatcher.cs index 09ee75bec..9613d48da 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageCookieMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageCookieMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Stef.Validation; using System; using System.Collections.Generic; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageGraphQLMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageGraphQLMatcher.cs index c8211963b..6351909a8 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageGraphQLMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageGraphQLMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; @@ -76,8 +78,7 @@ public double GetMatchingScore(IRequestMessage requestMessage, IRequestMatchResu private static MatchResult CalculateMatchResult(IRequestMessage requestMessage, IMatcher matcher) { - // Check if the matcher is a IStringMatcher - // If the body is a Json or a String, use the BodyAsString to match on. + // In case the matcher is a IStringMatcher and the body is a Json or a String, use the BodyAsString to match on. if (matcher is IStringMatcher stringMatcher && requestMessage.BodyData?.DetectedBodyType is BodyType.Json or BodyType.String or BodyType.FormUrlEncoded) { return stringMatcher.IsMatch(requestMessage.BodyData.BodyAsString); diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageHeaderMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageHeaderMatcher.cs index 00e0c1da7..77a5f04ce 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageHeaderMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageHeaderMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageHttpVersionMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageHttpVersionMatcher.cs index 3d2bdb62d..2de8c924f 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageHttpVersionMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageHttpVersionMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using Stef.Validation; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageMethodMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageMethodMatcher.cs index 3bc185271..36ff86c51 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageMethodMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageMethodMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using Stef.Validation; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageMultiPartMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageMultiPartMatcher.cs index 572e419bd..8b18ff5c5 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageMultiPartMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageMultiPartMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageParamMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageParamMatcher.cs index fcd9749c0..03f0c93b4 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageParamMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageParamMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; @@ -103,19 +105,14 @@ private double GetMatchScore(IRequestMessage requestMessage) return MatchScores.Mismatch; } - if (Matchers != null && Matchers.Any()) - { - // Return the score based on Matchers and valuesPresentInRequestMessage - return CalculateScore(Matchers, valuesPresentInRequestMessage); - } - if (Matchers == null || !Matchers.Any()) { // Matchers are null or not defined, and Key is present, just return Perfect. return MatchScores.Perfect; } - return MatchScores.Mismatch; + // Return the score based on Matchers and valuesPresentInRequestMessage + return CalculateScore(Matchers, valuesPresentInRequestMessage); } private static double CalculateScore(IReadOnlyList matchers, WireMockList valuesPresentInRequestMessage) diff --git a/src/WireMock.Net/Matchers/Request/RequestMessagePathMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessagePathMatcher.cs index 87aac9de7..3cf4c037f 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessagePathMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessagePathMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageProtoBufMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageProtoBufMatcher.cs index 004d1b70d..f9b52fd9b 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageProtoBufMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageProtoBufMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Models; diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageScenarioAndStateMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageScenarioAndStateMatcher.cs index 69babdb7f..f342a767d 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageScenarioAndStateMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageScenarioAndStateMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Matchers.Request; /// diff --git a/src/WireMock.Net/Matchers/Request/RequestMessageUrlMatcher.cs b/src/WireMock.Net/Matchers/Request/RequestMessageUrlMatcher.cs index c12c06cd7..810afb599 100644 --- a/src/WireMock.Net/Matchers/Request/RequestMessageUrlMatcher.cs +++ b/src/WireMock.Net/Matchers/Request/RequestMessageUrlMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Matchers/SimMetricsMatcher.cs b/src/WireMock.Net/Matchers/SimMetricsMatcher.cs index 0b0ef1b51..abf21bd33 100644 --- a/src/WireMock.Net/Matchers/SimMetricsMatcher.cs +++ b/src/WireMock.Net/Matchers/SimMetricsMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using AnyOfTypes; using SimMetrics.Net; diff --git a/src/WireMock.Net/Matchers/WildcardMatcher.cs b/src/WireMock.Net/Matchers/WildcardMatcher.cs index b71c7b877..462abe40f 100644 --- a/src/WireMock.Net/Matchers/WildcardMatcher.cs +++ b/src/WireMock.Net/Matchers/WildcardMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using System.Text.RegularExpressions; using AnyOfTypes; diff --git a/src/WireMock.Net/Matchers/XPathMatcher.cs b/src/WireMock.Net/Matchers/XPathMatcher.cs index ed9dbeca8..4fb24a457 100644 --- a/src/WireMock.Net/Matchers/XPathMatcher.cs +++ b/src/WireMock.Net/Matchers/XPathMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; @@ -76,7 +78,7 @@ public MatchResult IsMatch(string? input) { return CreateMatchResult(score); } - + score = MatchScores.ToScore(xPathEvaluator.Evaluate(_patterns, XmlNamespaceMap), MatchOperator); } catch (Exception exception) @@ -86,7 +88,7 @@ public MatchResult IsMatch(string? input) return CreateMatchResult(score); } - + private MatchResult CreateMatchResult(double score, Exception? exception = null) { return new MatchResult(MatchBehaviourHelper.Convert(MatchBehaviour, score), exception); @@ -103,8 +105,8 @@ public AnyOf[] GetPatterns() /// public string Name => nameof(XPathMatcher); - - private class XPathEvaluator + + private sealed class XPathEvaluator { private XmlDocument? _xmlDocument; private XPathNavigator? _xpathNavigator; @@ -126,15 +128,27 @@ public void Load(string input) public bool[] Evaluate(AnyOf[] patterns, IEnumerable? xmlNamespaceMap) { - XmlNamespaceManager? xmlNamespaceManager = GetXmlNamespaceManager(xmlNamespaceMap); - return patterns - .Select(p => + return _xpathNavigator == null ? [] : patterns.Select(pattern => true.Equals(Evaluate(_xpathNavigator, pattern, xmlNamespaceMap))).ToArray(); + } + private object Evaluate(XPathNavigator navigator, AnyOf pattern, IEnumerable? xmlNamespaceMap) + { + var xpath = $"boolean({pattern.GetPattern()})"; + + var xmlNamespaceManager = GetXmlNamespaceManager(xmlNamespaceMap); + if (xmlNamespaceManager == null) + { +#if NETSTANDARD1_3 + return navigator.Evaluate(xpath); +#else + return navigator.XPath2Evaluate(xpath); +#endif + } + #if NETSTANDARD1_3 - true.Equals(_xpathNavigator.Evaluate($"boolean({p.GetPattern()})", xmlNamespaceManager))) + return navigator.Evaluate(xpath, xmlNamespaceManager); #else - true.Equals(_xpathNavigator.XPath2Evaluate($"boolean({p.GetPattern()})", xmlNamespaceManager))) + return navigator.XPath2Evaluate(xpath, xmlNamespaceManager); #endif - .ToArray(); } private XmlNamespaceManager? GetXmlNamespaceManager(IEnumerable? xmlNamespaceMap) @@ -145,7 +159,7 @@ public bool[] Evaluate(AnyOf[] patterns, IEnumerable diff --git a/src/WireMock.Net/Models/TimeSettings.cs b/src/WireMock.Net/Models/TimeSettings.cs index 772dd2c5f..69f7ddf93 100644 --- a/src/WireMock.Net/Models/TimeSettings.cs +++ b/src/WireMock.Net/Models/TimeSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Models; diff --git a/src/WireMock.Net/Models/UrlDetails.cs b/src/WireMock.Net/Models/UrlDetails.cs index 7f227fbd5..35ab6c18f 100644 --- a/src/WireMock.Net/Models/UrlDetails.cs +++ b/src/WireMock.Net/Models/UrlDetails.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Stef.Validation; diff --git a/src/WireMock.Net/Models/Webhook.cs b/src/WireMock.Net/Models/Webhook.cs index db896bcca..5e7a017a3 100644 --- a/src/WireMock.Net/Models/Webhook.cs +++ b/src/WireMock.Net/Models/Webhook.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Models; /// diff --git a/src/WireMock.Net/Models/WebhookRequest.cs b/src/WireMock.Net/Models/WebhookRequest.cs index 96d49dd9b..9c6e0978b 100644 --- a/src/WireMock.Net/Models/WebhookRequest.cs +++ b/src/WireMock.Net/Models/WebhookRequest.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Types; using WireMock.Util; diff --git a/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETCore.cs b/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETCore.cs index ec77796c4..c687c17b0 100644 --- a/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETCore.cs +++ b/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETCore.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if NETCOREAPP3_1 || NET5_0_OR_GREATER using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; diff --git a/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard.cs b/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard.cs index 92dd11ef8..26536ece8 100644 --- a/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard.cs +++ b/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if USE_ASPNETCORE && !NETSTANDARD1_3 using System; using System.Collections.Generic; diff --git a/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard13.cs b/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard13.cs index 20737565a..9b85d76e5 100644 --- a/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard13.cs +++ b/src/WireMock.Net/Owin/AspNetCoreSelfHost.NETStandard13.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if USE_ASPNETCORE && NETSTANDARD1_3 using System.Collections.Generic; using Microsoft.AspNetCore.Hosting; diff --git a/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs b/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs index 7ffae3501..72784190f 100644 --- a/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs +++ b/src/WireMock.Net/Owin/AspNetCoreSelfHost.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if USE_ASPNETCORE using System; using System.Collections.Generic; diff --git a/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs b/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs index 7b8dfcc0f..516484df8 100644 --- a/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs +++ b/src/WireMock.Net/Owin/GlobalExceptionMiddleware.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Newtonsoft.Json; @@ -24,21 +26,15 @@ internal class GlobalExceptionMiddleware : OwinMiddleware #if !USE_ASPNETCORE public GlobalExceptionMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinResponseMapper responseMapper) : base(next) { - Guard.NotNull(options, nameof(options)); - Guard.NotNull(responseMapper, nameof(responseMapper)); - - _options = options; - _responseMapper = responseMapper; + _options = Guard.NotNull(options); + _responseMapper = Guard.NotNull(responseMapper);; } #else public GlobalExceptionMiddleware(Next next, IWireMockMiddlewareOptions options, IOwinResponseMapper responseMapper) { - Guard.NotNull(options, nameof(options)); - Guard.NotNull(responseMapper, nameof(responseMapper)); - Next = next; - _options = options; - _responseMapper = responseMapper; + _options = Guard.NotNull(options); + _responseMapper = Guard.NotNull(responseMapper); } #endif diff --git a/src/WireMock.Net/Owin/HostUrlDetails.cs b/src/WireMock.Net/Owin/HostUrlDetails.cs index 8c30c8e44..fe3bac22a 100644 --- a/src/WireMock.Net/Owin/HostUrlDetails.cs +++ b/src/WireMock.Net/Owin/HostUrlDetails.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Owin; /// diff --git a/src/WireMock.Net/Owin/HostUrlOptions.cs b/src/WireMock.Net/Owin/HostUrlOptions.cs index 1c82d01fe..f5e0b22a7 100644 --- a/src/WireMock.Net/Owin/HostUrlOptions.cs +++ b/src/WireMock.Net/Owin/HostUrlOptions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Types; using WireMock.Util; diff --git a/src/WireMock.Net/Owin/IMappingMatcher.cs b/src/WireMock.Net/Owin/IMappingMatcher.cs index ffcecd749..73e6e1529 100644 --- a/src/WireMock.Net/Owin/IMappingMatcher.cs +++ b/src/WireMock.Net/Owin/IMappingMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Owin; internal interface IMappingMatcher diff --git a/src/WireMock.Net/Owin/IOwinSelfHost.cs b/src/WireMock.Net/Owin/IOwinSelfHost.cs index 781445fcb..78bfa24d5 100644 --- a/src/WireMock.Net/Owin/IOwinSelfHost.cs +++ b/src/WireMock.Net/Owin/IOwinSelfHost.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Threading.Tasks; using System; diff --git a/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs b/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs index 342bfe1ab..cd4c4d8d2 100644 --- a/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs +++ b/src/WireMock.Net/Owin/IWireMockMiddlewareOptions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using WireMock.Handlers; diff --git a/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs b/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs index efe8c0adf..f5e00598c 100644 --- a/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs +++ b/src/WireMock.Net/Owin/Mappers/IOwinRequestMapper.cs @@ -1,4 +1,6 @@ -using System.Threading.Tasks; +// Copyright © WireMock.Net + +using System.Threading.Tasks; #if !USE_ASPNETCORE using IRequest = Microsoft.Owin.IOwinRequest; #else diff --git a/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs b/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs index 511a08f0b..304361f75 100644 --- a/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs +++ b/src/WireMock.Net/Owin/Mappers/IOwinResponseMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; #if !USE_ASPNETCORE using IResponse = Microsoft.Owin.IOwinResponse; diff --git a/src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs b/src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs index f9eb1cb39..02acc7f72 100644 --- a/src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs +++ b/src/WireMock.Net/Owin/Mappers/OwinRequestMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs b/src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs index c1ceb39f4..d36ae0302 100644 --- a/src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs +++ b/src/WireMock.Net/Owin/Mappers/OwinResponseMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Globalization; diff --git a/src/WireMock.Net/Owin/MappingMatcher.cs b/src/WireMock.Net/Owin/MappingMatcher.cs index bc3342a88..878618136 100644 --- a/src/WireMock.Net/Owin/MappingMatcher.cs +++ b/src/WireMock.Net/Owin/MappingMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Owin/MappingMatcherResult.cs b/src/WireMock.Net/Owin/MappingMatcherResult.cs index 848a69bb9..2d395ff4e 100644 --- a/src/WireMock.Net/Owin/MappingMatcherResult.cs +++ b/src/WireMock.Net/Owin/MappingMatcherResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Stef.Validation; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/Owin/OwinSelfHost.cs b/src/WireMock.Net/Owin/OwinSelfHost.cs index f8065f69e..d9f8c537b 100644 --- a/src/WireMock.Net/Owin/OwinSelfHost.cs +++ b/src/WireMock.Net/Owin/OwinSelfHost.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !USE_ASPNETCORE using Microsoft.Owin.Hosting; using Owin; @@ -24,10 +26,9 @@ internal class OwinSelfHost : IOwinSelfHost public OwinSelfHost(IWireMockMiddlewareOptions options, HostUrlOptions urlOptions) { - Guard.NotNull(options, nameof(options)); - Guard.NotNull(urlOptions, nameof(urlOptions)); + Guard.NotNull(urlOptions); - _options = options; + _options = Guard.NotNull(options); _logger = options.Logger ?? new WireMockConsoleLogger(); foreach (var detail in urlOptions.GetDetails()) diff --git a/src/WireMock.Net/Owin/WireMockMiddleware.cs b/src/WireMock.Net/Owin/WireMockMiddleware.cs index d183aa0b1..cb389c434 100644 --- a/src/WireMock.Net/Owin/WireMockMiddleware.cs +++ b/src/WireMock.Net/Owin/WireMockMiddleware.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using System.Linq; diff --git a/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs b/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs index 2e52f7f2b..eff4c4e56 100644 --- a/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs +++ b/src/WireMock.Net/Owin/WireMockMiddlewareOptions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using WireMock.Handlers; @@ -20,7 +22,7 @@ internal class WireMockMiddlewareOptions : IWireMockMiddlewareOptions public TimeSpan? RequestProcessingDelay { get; set; } - public IStringMatcher AuthenticationMatcher { get; set; } + public IStringMatcher? AuthenticationMatcher { get; set; } public bool? AllowPartialMapping { get; set; } @@ -50,7 +52,7 @@ internal class WireMockMiddlewareOptions : IWireMockMiddlewareOptions #endif /// - public IFileSystemHandler FileSystemHandler { get; set; } + public IFileSystemHandler? FileSystemHandler { get; set; } /// public bool? AllowBodyForAllHttpMethods { get; set; } diff --git a/src/WireMock.Net/Owin/WireMockMiddlewareOptionsHelper.cs b/src/WireMock.Net/Owin/WireMockMiddlewareOptionsHelper.cs index 8e555a594..9a084d885 100644 --- a/src/WireMock.Net/Owin/WireMockMiddlewareOptionsHelper.cs +++ b/src/WireMock.Net/Owin/WireMockMiddlewareOptionsHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Stef.Validation; using WireMock.Settings; diff --git a/src/WireMock.Net/Pact/Models/V2/Interaction.cs b/src/WireMock.Net/Pact/Models/V2/Interaction.cs index b5d4de8ee..f9cd98552 100644 --- a/src/WireMock.Net/Pact/Models/V2/Interaction.cs +++ b/src/WireMock.Net/Pact/Models/V2/Interaction.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 namespace WireMock.Pact.Models.V2; diff --git a/src/WireMock.Net/Pact/Models/V2/MatchingRule.cs b/src/WireMock.Net/Pact/Models/V2/MatchingRule.cs index 6d08751b1..ada09a345 100644 --- a/src/WireMock.Net/Pact/Models/V2/MatchingRule.cs +++ b/src/WireMock.Net/Pact/Models/V2/MatchingRule.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 namespace WireMock.Pact.Models.V2; diff --git a/src/WireMock.Net/Pact/Models/V2/Metadata.cs b/src/WireMock.Net/Pact/Models/V2/Metadata.cs index f3c8edddf..4036b1efc 100644 --- a/src/WireMock.Net/Pact/Models/V2/Metadata.cs +++ b/src/WireMock.Net/Pact/Models/V2/Metadata.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 namespace WireMock.Pact.Models.V2; diff --git a/src/WireMock.Net/Pact/Models/V2/Pact.cs b/src/WireMock.Net/Pact/Models/V2/Pact.cs index de8e904ae..90ae6f29f 100644 --- a/src/WireMock.Net/Pact/Models/V2/Pact.cs +++ b/src/WireMock.Net/Pact/Models/V2/Pact.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System.Collections.Generic; diff --git a/src/WireMock.Net/Pact/Models/V2/PactRequest.cs b/src/WireMock.Net/Pact/Models/V2/PactRequest.cs index 03ac4bc68..6c99359b3 100644 --- a/src/WireMock.Net/Pact/Models/V2/PactRequest.cs +++ b/src/WireMock.Net/Pact/Models/V2/PactRequest.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System.Collections.Generic; using WireMock.Constants; diff --git a/src/WireMock.Net/Pact/Models/V2/PactResponse.cs b/src/WireMock.Net/Pact/Models/V2/PactResponse.cs index e5e4fbb8d..9cb2e1f43 100644 --- a/src/WireMock.Net/Pact/Models/V2/PactResponse.cs +++ b/src/WireMock.Net/Pact/Models/V2/PactResponse.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System.Collections.Generic; diff --git a/src/WireMock.Net/Pact/Models/V2/PactRust.cs b/src/WireMock.Net/Pact/Models/V2/PactRust.cs index d9cd1e3b9..42ec53aa3 100644 --- a/src/WireMock.Net/Pact/Models/V2/PactRust.cs +++ b/src/WireMock.Net/Pact/Models/V2/PactRust.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 namespace WireMock.Pact.Models.V2; diff --git a/src/WireMock.Net/Pact/Models/V2/PactSpecification.cs b/src/WireMock.Net/Pact/Models/V2/PactSpecification.cs index c91515f8b..081e906ee 100644 --- a/src/WireMock.Net/Pact/Models/V2/PactSpecification.cs +++ b/src/WireMock.Net/Pact/Models/V2/PactSpecification.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 namespace WireMock.Pact.Models.V2; diff --git a/src/WireMock.Net/Pact/Models/V2/Pacticipant.cs b/src/WireMock.Net/Pact/Models/V2/Pacticipant.cs index b701137e1..c55e8919a 100644 --- a/src/WireMock.Net/Pact/Models/V2/Pacticipant.cs +++ b/src/WireMock.Net/Pact/Models/V2/Pacticipant.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 namespace WireMock.Pact.Models.V2; diff --git a/src/WireMock.Net/Pact/Models/V2/ProviderState.cs b/src/WireMock.Net/Pact/Models/V2/ProviderState.cs index dd9a5a0d3..6e597b045 100644 --- a/src/WireMock.Net/Pact/Models/V2/ProviderState.cs +++ b/src/WireMock.Net/Pact/Models/V2/ProviderState.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #pragma warning disable CS1591 using System.Collections.Generic; diff --git a/src/WireMock.Net/Properties/AssemblyInfo.cs b/src/WireMock.Net/Properties/AssemblyInfo.cs index 5aa4c57c5..9779fef7f 100644 --- a/src/WireMock.Net/Properties/AssemblyInfo.cs +++ b/src/WireMock.Net/Properties/AssemblyInfo.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Runtime.CompilerServices; [assembly: InternalsVisibleTo("WireMock.Net.Matchers.CSharpCode, PublicKey=0024000004800000940000000602000000240000525341310004000001000100e138ec44d93acac565953052636eb8d5e7e9f27ddb030590055cd1a0ab2069a5623f1f77ca907d78e0b37066ca0f6d63da7eecc3fcb65b76aa8ebeccf7ebe1d11264b8404cd9b1cbbf2c83f566e033b3e54129f6ef28daffff776ba7aebbc53c0d635ebad8f45f78eb3f7e0459023c218f003416e080f96a1a3c5ffeb56bee9e")] diff --git a/src/WireMock.Net/Proxy/ProxyHelper.cs b/src/WireMock.Net/Proxy/ProxyHelper.cs index 5a7728260..78360a016 100644 --- a/src/WireMock.Net/Proxy/ProxyHelper.cs +++ b/src/WireMock.Net/Proxy/ProxyHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net.Http; @@ -92,7 +94,7 @@ public ProxyHelper(WireMockServerSettings settings) return (responseMessage, newMapping); } - private static bool Check(ProxySaveMappingSetting? saveMappingSetting, Func action) + private static bool Check(ProxySaveMappingSetting? saveMappingSetting, Func action) where T : notnull { var isMatch = saveMappingSetting is null || action(); var matchBehaviour = saveMappingSetting?.MatchBehaviour ?? MatchBehaviour.AcceptOnMatch; diff --git a/src/WireMock.Net/RegularExpressions/RegexExtended.cs b/src/WireMock.Net/RegularExpressions/RegexExtended.cs index 72b46cbdc..f3e5990bd 100644 --- a/src/WireMock.Net/RegularExpressions/RegexExtended.cs +++ b/src/WireMock.Net/RegularExpressions/RegexExtended.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Text.RegularExpressions; @@ -20,7 +22,7 @@ public RegexExtended(string pattern) : this(pattern, RegexOptions.None) /// public RegexExtended(string pattern, RegexOptions options) : - this(pattern, options, Regex.InfiniteMatchTimeout) + this(pattern, options, InfiniteMatchTimeout) { } @@ -30,7 +32,7 @@ public RegexExtended(string pattern, RegexOptions options, TimeSpan matchTimeout { } -#if !NETSTANDARD1_3 +#if !NETSTANDARD1_3 && !NET8_0_OR_GREATER /// protected RegexExtended(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) diff --git a/src/WireMock.Net/RequestBuilders/IBodyRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IBodyRequestBuilder.cs index c07022474..8e046b4ac 100644 --- a/src/WireMock.Net/RequestBuilders/IBodyRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IBodyRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using JsonConverter.Abstractions; diff --git a/src/WireMock.Net/RequestBuilders/IClientIPRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IClientIPRequestBuilder.cs index 1d4fb1339..4955c5a6a 100644 --- a/src/WireMock.Net/RequestBuilders/IClientIPRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IClientIPRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/ICookiesRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/ICookiesRequestBuilder.cs index a6105274c..bd53e3811 100644 --- a/src/WireMock.Net/RequestBuilders/ICookiesRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/ICookiesRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/IGraphQLRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IGraphQLRequestBuilder.cs index 7dc3cac28..276bda680 100644 --- a/src/WireMock.Net/RequestBuilders/IGraphQLRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IGraphQLRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/IHeadersRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IHeadersRequestBuilder.cs index 24ad8f802..82a03949c 100644 --- a/src/WireMock.Net/RequestBuilders/IHeadersRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IHeadersRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/IHttpVersionBuilder.cs b/src/WireMock.Net/RequestBuilders/IHttpVersionBuilder.cs index b25c1bac2..f10b1a39a 100644 --- a/src/WireMock.Net/RequestBuilders/IHttpVersionBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IHttpVersionBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/RequestBuilders/IMethodRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IMethodRequestBuilder.cs index 7e21a6d88..879b5aeb3 100644 --- a/src/WireMock.Net/RequestBuilders/IMethodRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IMethodRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; namespace WireMock.RequestBuilders; diff --git a/src/WireMock.Net/RequestBuilders/IMultiPartRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IMultiPartRequestBuilder.cs index 4db8bc175..4fe26daf8 100644 --- a/src/WireMock.Net/RequestBuilders/IMultiPartRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IMultiPartRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/RequestBuilders/IParamsRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IParamsRequestBuilder.cs index 763e5a1a4..605060035 100644 --- a/src/WireMock.Net/RequestBuilders/IParamsRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IParamsRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/IProtoBufRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IProtoBufRequestBuilder.cs index e13ec1e5d..daaceadad 100644 --- a/src/WireMock.Net/RequestBuilders/IProtoBufRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IProtoBufRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; namespace WireMock.RequestBuilders; diff --git a/src/WireMock.Net/RequestBuilders/IRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IRequestBuilder.cs index 753039058..0304d15d3 100644 --- a/src/WireMock.Net/RequestBuilders/IRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.RequestBuilders; /// diff --git a/src/WireMock.Net/RequestBuilders/IUrlAndPathRequestBuilder.cs b/src/WireMock.Net/RequestBuilders/IUrlAndPathRequestBuilder.cs index 863535f2f..7118e8290 100644 --- a/src/WireMock.Net/RequestBuilders/IUrlAndPathRequestBuilder.cs +++ b/src/WireMock.Net/RequestBuilders/IUrlAndPathRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/Request.ClientIP.cs b/src/WireMock.Net/RequestBuilders/Request.ClientIP.cs index 6b7560208..8629c9687 100644 --- a/src/WireMock.Net/RequestBuilders/Request.ClientIP.cs +++ b/src/WireMock.Net/RequestBuilders/Request.ClientIP.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Stef.Validation; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/Request.UsingMethods.cs b/src/WireMock.Net/RequestBuilders/Request.UsingMethods.cs index f5c4d1a44..c691d41ef 100644 --- a/src/WireMock.Net/RequestBuilders/Request.UsingMethods.cs +++ b/src/WireMock.Net/RequestBuilders/Request.UsingMethods.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System.Linq; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithBody.cs b/src/WireMock.Net/RequestBuilders/Request.WithBody.cs index a64efb02d..199265290 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithBody.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithBody.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithBodyAsProtoBuf.cs b/src/WireMock.Net/RequestBuilders/Request.WithBodyAsProtoBuf.cs index 2c3eb187b..2f4935689 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithBodyAsProtoBuf.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithBodyAsProtoBuf.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithCookies.cs b/src/WireMock.Net/RequestBuilders/Request.WithCookies.cs index c29b4595c..a34eeba0d 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithCookies.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithCookies.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Matchers; @@ -17,8 +19,8 @@ public IRequestBuilder WithCookie(string name, string pattern, MatchBehaviour ma /// public IRequestBuilder WithCookie(string name, string pattern, bool ignoreCase = true, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) { - Guard.NotNull(name, nameof(name)); - Guard.NotNull(pattern, nameof(pattern)); + Guard.NotNull(name); + Guard.NotNull(pattern); _requestMatchers.Add(new RequestMessageCookieMatcher(matchBehaviour, name, pattern, ignoreCase)); return this; @@ -33,8 +35,8 @@ public IRequestBuilder WithCookie(string name, string[] patterns, MatchBehaviour /// public IRequestBuilder WithCookie(string name, string[] patterns, bool ignoreCase = true, MatchBehaviour matchBehaviour = MatchBehaviour.AcceptOnMatch) { - Guard.NotNull(name, nameof(name)); - Guard.NotNull(patterns, nameof(patterns)); + Guard.NotNull(name); + Guard.NotNull(patterns); _requestMatchers.Add(new RequestMessageCookieMatcher(matchBehaviour, name, ignoreCase, patterns)); return this; @@ -43,8 +45,8 @@ public IRequestBuilder WithCookie(string name, string[] patterns, bool ignoreCas /// public IRequestBuilder WithCookie(string name, params IStringMatcher[] matchers) { - Guard.NotNull(name, nameof(name)); - Guard.NotNullOrEmpty(matchers, nameof(matchers)); + Guard.NotNull(name); + Guard.NotNullOrEmpty(matchers); _requestMatchers.Add(new RequestMessageCookieMatcher(MatchBehaviour.AcceptOnMatch, name, false, matchers)); return this; @@ -53,8 +55,8 @@ public IRequestBuilder WithCookie(string name, params IStringMatcher[] matchers) /// public IRequestBuilder WithCookie(string name, bool ignoreCase, params IStringMatcher[] matchers) { - Guard.NotNull(name, nameof(name)); - Guard.NotNullOrEmpty(matchers, nameof(matchers)); + Guard.NotNull(name); + Guard.NotNullOrEmpty(matchers); _requestMatchers.Add(new RequestMessageCookieMatcher(MatchBehaviour.AcceptOnMatch, name, ignoreCase, matchers)); return this; @@ -63,8 +65,8 @@ public IRequestBuilder WithCookie(string name, bool ignoreCase, params IStringMa /// public IRequestBuilder WithCookie(string name, bool ignoreCase, MatchBehaviour matchBehaviour, params IStringMatcher[] matchers) { - Guard.NotNull(name, nameof(name)); - Guard.NotNullOrEmpty(matchers, nameof(matchers)); + Guard.NotNull(name); + Guard.NotNullOrEmpty(matchers); _requestMatchers.Add(new RequestMessageCookieMatcher(matchBehaviour, name, ignoreCase, matchers)); return this; @@ -73,7 +75,7 @@ public IRequestBuilder WithCookie(string name, bool ignoreCase, MatchBehaviour m /// public IRequestBuilder WithCookie(params Func, bool>[] funcs) { - Guard.NotNullOrEmpty(funcs, nameof(funcs)); + Guard.NotNullOrEmpty(funcs); _requestMatchers.Add(new RequestMessageCookieMatcher(funcs)); return this; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithGraphQLSchema.cs b/src/WireMock.Net/RequestBuilders/Request.WithGraphQLSchema.cs index 43113c5b1..982d8dfd2 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithGraphQLSchema.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithGraphQLSchema.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithHeaders.cs b/src/WireMock.Net/RequestBuilders/Request.WithHeaders.cs index 41f07c068..af1b75eda 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithHeaders.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithHeaders.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithHttpVersion.cs b/src/WireMock.Net/RequestBuilders/Request.WithHttpVersion.cs index ef1844306..2d0ed702e 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithHttpVersion.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithHttpVersion.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithMultiPart.cs b/src/WireMock.Net/RequestBuilders/Request.WithMultiPart.cs index 64011c307..9e89e20ad 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithMultiPart.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithMultiPart.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithParam.cs b/src/WireMock.Net/RequestBuilders/Request.WithParam.cs index 5ce3034c9..cea69e287 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithParam.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithParam.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; @@ -83,7 +85,7 @@ public IRequestBuilder WithParam(string key, MatchBehaviour matchBehaviour, bool /// public IRequestBuilder WithParam(params Func>, bool>[] funcs) { - Guard.NotNullOrEmpty(funcs, nameof(funcs)); + Guard.NotNullOrEmpty(funcs); _requestMatchers.Add(new RequestMessageParamMatcher(funcs)); return this; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithPath.cs b/src/WireMock.Net/RequestBuilders/Request.WithPath.cs index 24f3d200e..2a5939bbb 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithPath.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithPath.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Stef.Validation; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/Request.WithUrl.cs b/src/WireMock.Net/RequestBuilders/Request.WithUrl.cs index 7f811e93d..239f98f04 100644 --- a/src/WireMock.Net/RequestBuilders/Request.WithUrl.cs +++ b/src/WireMock.Net/RequestBuilders/Request.WithUrl.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Stef.Validation; using WireMock.Matchers; diff --git a/src/WireMock.Net/RequestBuilders/Request.cs b/src/WireMock.Net/RequestBuilders/Request.cs index f375b6987..2d5d90f0e 100644 --- a/src/WireMock.Net/RequestBuilders/Request.cs +++ b/src/WireMock.Net/RequestBuilders/Request.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; diff --git a/src/WireMock.Net/RequestMessage.cs b/src/WireMock.Net/RequestMessage.cs index 20b4518e9..a9f599cad 100644 --- a/src/WireMock.Net/RequestMessage.cs +++ b/src/WireMock.Net/RequestMessage.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; diff --git a/src/WireMock.Net/ResponseBuilders/BodyDestinationFormat.cs b/src/WireMock.Net/ResponseBuilders/BodyDestinationFormat.cs index 7300c2c08..1424699bf 100644 --- a/src/WireMock.Net/ResponseBuilders/BodyDestinationFormat.cs +++ b/src/WireMock.Net/ResponseBuilders/BodyDestinationFormat.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.ResponseBuilders; /// diff --git a/src/WireMock.Net/ResponseBuilders/IBodyResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/IBodyResponseBuilder.cs index 709259830..e1ff7e50b 100644 --- a/src/WireMock.Net/ResponseBuilders/IBodyResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IBodyResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text; using System.Threading.Tasks; diff --git a/src/WireMock.Net/ResponseBuilders/ICallbackResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/ICallbackResponseBuilder.cs index e174116f0..0498d87b6 100644 --- a/src/WireMock.Net/ResponseBuilders/ICallbackResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/ICallbackResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using JetBrains.Annotations; diff --git a/src/WireMock.Net/ResponseBuilders/IDelayResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/IDelayResponseBuilder.cs index fdc440f10..23377290a 100644 --- a/src/WireMock.Net/ResponseBuilders/IDelayResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IDelayResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.ResponseBuilders; diff --git a/src/WireMock.Net/ResponseBuilders/IFaultRequestBuilder.cs b/src/WireMock.Net/ResponseBuilders/IFaultRequestBuilder.cs index 2aee085bc..e236340c5 100644 --- a/src/WireMock.Net/ResponseBuilders/IFaultRequestBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IFaultRequestBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using JetBrains.Annotations; namespace WireMock.ResponseBuilders; diff --git a/src/WireMock.Net/ResponseBuilders/IHeadersResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/IHeadersResponseBuilder.cs index 7d195c532..634508f16 100644 --- a/src/WireMock.Net/ResponseBuilders/IHeadersResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IHeadersResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Types; diff --git a/src/WireMock.Net/ResponseBuilders/IProxyResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/IProxyResponseBuilder.cs index e5ff1d01a..a164f7d26 100644 --- a/src/WireMock.Net/ResponseBuilders/IProxyResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IProxyResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Security.Cryptography.X509Certificates; using WireMock.Settings; diff --git a/src/WireMock.Net/ResponseBuilders/IResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/IResponseBuilder.cs index 0d531e9c7..2492cff21 100644 --- a/src/WireMock.Net/ResponseBuilders/IResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.ResponseBuilders; /// diff --git a/src/WireMock.Net/ResponseBuilders/IStatusCodeResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/IStatusCodeResponseBuilder.cs index 89a121101..dd294d0ba 100644 --- a/src/WireMock.Net/ResponseBuilders/IStatusCodeResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/IStatusCodeResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net; using WireMock.Settings; diff --git a/src/WireMock.Net/ResponseBuilders/ITransformResponseBuilder.cs b/src/WireMock.Net/ResponseBuilders/ITransformResponseBuilder.cs index 6e7a8ed81..36be96af3 100644 --- a/src/WireMock.Net/ResponseBuilders/ITransformResponseBuilder.cs +++ b/src/WireMock.Net/ResponseBuilders/ITransformResponseBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Types; namespace WireMock.ResponseBuilders; diff --git a/src/WireMock.Net/ResponseBuilders/Response.WithBody.cs b/src/WireMock.Net/ResponseBuilders/Response.WithBody.cs index 1fd6c451e..4d5588897 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.WithBody.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.WithBody.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text; using System.Threading.Tasks; diff --git a/src/WireMock.Net/ResponseBuilders/Response.WithCallback.cs b/src/WireMock.Net/ResponseBuilders/Response.WithCallback.cs index 72ee8195d..53ce4313f 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.WithCallback.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.WithCallback.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Diagnostics.CodeAnalysis; using System.Threading.Tasks; diff --git a/src/WireMock.Net/ResponseBuilders/Response.WithFault.cs b/src/WireMock.Net/ResponseBuilders/Response.WithFault.cs index 8c078f6e2..4654c1729 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.WithFault.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.WithFault.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.ResponseBuilders; public partial class Response diff --git a/src/WireMock.Net/ResponseBuilders/Response.WithHeaders.cs b/src/WireMock.Net/ResponseBuilders/Response.WithHeaders.cs index 08d2be926..3f19d28d4 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.WithHeaders.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.WithHeaders.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using Stef.Validation; diff --git a/src/WireMock.Net/ResponseBuilders/Response.WithProxy.cs b/src/WireMock.Net/ResponseBuilders/Response.WithProxy.cs index 359745ebf..71db4cc97 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.WithProxy.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.WithProxy.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net.Http; using WireMock.Http; using WireMock.Settings; diff --git a/src/WireMock.Net/ResponseBuilders/Response.cs b/src/WireMock.Net/ResponseBuilders/Response.cs index 7932dcfde..e9e7537ff 100644 --- a/src/WireMock.Net/ResponseBuilders/Response.cs +++ b/src/WireMock.Net/ResponseBuilders/Response.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; diff --git a/src/WireMock.Net/ResponseMessage.cs b/src/WireMock.Net/ResponseMessage.cs index 6596f7f7e..e97cd929e 100644 --- a/src/WireMock.Net/ResponseMessage.cs +++ b/src/WireMock.Net/ResponseMessage.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System.Collections.Generic; diff --git a/src/WireMock.Net/ResponseMessageBuilder.cs b/src/WireMock.Net/ResponseMessageBuilder.cs index f1c7120b0..859632a0a 100644 --- a/src/WireMock.Net/ResponseMessageBuilder.cs +++ b/src/WireMock.Net/ResponseMessageBuilder.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Net; diff --git a/src/WireMock.Net/ResponseProviders/DynamicAsyncResponseProvider.cs b/src/WireMock.Net/ResponseProviders/DynamicAsyncResponseProvider.cs index 90201a34b..798618327 100644 --- a/src/WireMock.Net/ResponseProviders/DynamicAsyncResponseProvider.cs +++ b/src/WireMock.Net/ResponseProviders/DynamicAsyncResponseProvider.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Stef.Validation; diff --git a/src/WireMock.Net/ResponseProviders/DynamicResponseProvider.cs b/src/WireMock.Net/ResponseProviders/DynamicResponseProvider.cs index 2c151a1e9..8ea2eef13 100644 --- a/src/WireMock.Net/ResponseProviders/DynamicResponseProvider.cs +++ b/src/WireMock.Net/ResponseProviders/DynamicResponseProvider.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Stef.Validation; diff --git a/src/WireMock.Net/ResponseProviders/IResponseProvider.cs b/src/WireMock.Net/ResponseProviders/IResponseProvider.cs index 61e136a50..b82b2730c 100644 --- a/src/WireMock.Net/ResponseProviders/IResponseProvider.cs +++ b/src/WireMock.Net/ResponseProviders/IResponseProvider.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System.Threading.Tasks; diff --git a/src/WireMock.Net/ResponseProviders/ProxyAsyncResponseProvider.cs b/src/WireMock.Net/ResponseProviders/ProxyAsyncResponseProvider.cs index 2cc6d853a..c60ebaad6 100644 --- a/src/WireMock.Net/ResponseProviders/ProxyAsyncResponseProvider.cs +++ b/src/WireMock.Net/ResponseProviders/ProxyAsyncResponseProvider.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Stef.Validation; diff --git a/src/WireMock.Net/ScenarioState.cs b/src/WireMock.Net/ScenarioState.cs index 37e303e69..fa8da7094 100644 --- a/src/WireMock.Net/ScenarioState.cs +++ b/src/WireMock.Net/ScenarioState.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock; /// diff --git a/src/WireMock.Net/Serialization/JsonSerializationConstants.cs b/src/WireMock.Net/Serialization/JsonSerializationConstants.cs index a73f1ee3f..1fd258a5f 100644 --- a/src/WireMock.Net/Serialization/JsonSerializationConstants.cs +++ b/src/WireMock.Net/Serialization/JsonSerializationConstants.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Newtonsoft.Json; using Newtonsoft.Json.Serialization; diff --git a/src/WireMock.Net/Serialization/LogEntryMapper.cs b/src/WireMock.Net/Serialization/LogEntryMapper.cs index 61e7a766d..53a5ba7ea 100644 --- a/src/WireMock.Net/Serialization/LogEntryMapper.cs +++ b/src/WireMock.Net/Serialization/LogEntryMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using Stef.Validation; using WireMock.Admin.Mappings; diff --git a/src/WireMock.Net/Serialization/MappingConverter.cs b/src/WireMock.Net/Serialization/MappingConverter.cs index 27676b249..98e6011aa 100644 --- a/src/WireMock.Net/Serialization/MappingConverter.cs +++ b/src/WireMock.Net/Serialization/MappingConverter.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Serialization/MappingConverterSettings.cs b/src/WireMock.Net/Serialization/MappingConverterSettings.cs index 9d9f3c980..4d07712b9 100644 --- a/src/WireMock.Net/Serialization/MappingConverterSettings.cs +++ b/src/WireMock.Net/Serialization/MappingConverterSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Types; namespace WireMock.Serialization; diff --git a/src/WireMock.Net/Serialization/MappingFileNameSanitizer.cs b/src/WireMock.Net/Serialization/MappingFileNameSanitizer.cs index 8e5e73f09..c41716d51 100644 --- a/src/WireMock.Net/Serialization/MappingFileNameSanitizer.cs +++ b/src/WireMock.Net/Serialization/MappingFileNameSanitizer.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Linq; using Stef.Validation; diff --git a/src/WireMock.Net/Serialization/MappingToFileSaver.cs b/src/WireMock.Net/Serialization/MappingToFileSaver.cs index 7b548299b..3e6c8610c 100644 --- a/src/WireMock.Net/Serialization/MappingToFileSaver.cs +++ b/src/WireMock.Net/Serialization/MappingToFileSaver.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Linq; using Newtonsoft.Json; diff --git a/src/WireMock.Net/Serialization/MatcherMapper.cs b/src/WireMock.Net/Serialization/MatcherMapper.cs index 0041e20d6..370c2a572 100644 --- a/src/WireMock.Net/Serialization/MatcherMapper.cs +++ b/src/WireMock.Net/Serialization/MatcherMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Serialization/PactMapper.cs b/src/WireMock.Net/Serialization/PactMapper.cs index 8062a7dab..05b35a71d 100644 --- a/src/WireMock.Net/Serialization/PactMapper.cs +++ b/src/WireMock.Net/Serialization/PactMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Serialization/ProxyMappingConverter.cs b/src/WireMock.Net/Serialization/ProxyMappingConverter.cs index 9bd07fe74..7fe7ae85d 100644 --- a/src/WireMock.Net/Serialization/ProxyMappingConverter.cs +++ b/src/WireMock.Net/Serialization/ProxyMappingConverter.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Serialization/SwaggerMapper.cs b/src/WireMock.Net/Serialization/SwaggerMapper.cs index 5cbdf502d..6f050f73b 100644 --- a/src/WireMock.Net/Serialization/SwaggerMapper.cs +++ b/src/WireMock.Net/Serialization/SwaggerMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; diff --git a/src/WireMock.Net/Serialization/TimeSettingsMapper.cs b/src/WireMock.Net/Serialization/TimeSettingsMapper.cs index 7e78764c2..795d66ec0 100644 --- a/src/WireMock.Net/Serialization/TimeSettingsMapper.cs +++ b/src/WireMock.Net/Serialization/TimeSettingsMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Models; namespace WireMock.Serialization; diff --git a/src/WireMock.Net/Serialization/WebhookMapper.cs b/src/WireMock.Net/Serialization/WebhookMapper.cs index 557f05dbf..610b8c2c5 100644 --- a/src/WireMock.Net/Serialization/WebhookMapper.cs +++ b/src/WireMock.Net/Serialization/WebhookMapper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Server/IRespondWithAProvider.cs b/src/WireMock.Net/Server/IRespondWithAProvider.cs index 7220ba11d..e2b57a378 100644 --- a/src/WireMock.Net/Server/IRespondWithAProvider.cs +++ b/src/WireMock.Net/Server/IRespondWithAProvider.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using WireMock.Models; diff --git a/src/WireMock.Net/Server/RespondWithAProvider.cs b/src/WireMock.Net/Server/RespondWithAProvider.cs index c3e793030..c10e50bc7 100644 --- a/src/WireMock.Net/Server/RespondWithAProvider.cs +++ b/src/WireMock.Net/Server/RespondWithAProvider.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net and mock4net by Alexandre Victoor + // This source file is based on mock4net by Alexandre Victoor which is licensed under the Apache 2.0 License. // For more details see 'mock4net/LICENSE.txt' and 'mock4net/readme.md' in this project root. using System; diff --git a/src/WireMock.Net/Server/WireMockServer.Admin.cs b/src/WireMock.Net/Server/WireMockServer.Admin.cs index c52ab4999..a707c1d02 100644 --- a/src/WireMock.Net/Server/WireMockServer.Admin.cs +++ b/src/WireMock.Net/Server/WireMockServer.Admin.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.IO; diff --git a/src/WireMock.Net/Server/WireMockServer.AdminFiles.cs b/src/WireMock.Net/Server/WireMockServer.AdminFiles.cs index 6a374ec08..cf8b7ba65 100644 --- a/src/WireMock.Net/Server/WireMockServer.AdminFiles.cs +++ b/src/WireMock.Net/Server/WireMockServer.AdminFiles.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Linq; using System.Net; diff --git a/src/WireMock.Net/Server/WireMockServer.ConvertMapping.cs b/src/WireMock.Net/Server/WireMockServer.ConvertMapping.cs index f67fad171..10c042dd0 100644 --- a/src/WireMock.Net/Server/WireMockServer.ConvertMapping.cs +++ b/src/WireMock.Net/Server/WireMockServer.ConvertMapping.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; @@ -37,8 +39,8 @@ private void ConvertMappingsAndRegisterAsRespondProvider(IReadOnlyList diff --git a/src/WireMock.Net/Settings/SimpleSettingsParser.cs b/src/WireMock.Net/Settings/SimpleSettingsParser.cs index 6daed1e97..ce5b94e2f 100644 --- a/src/WireMock.Net/Settings/SimpleSettingsParser.cs +++ b/src/WireMock.Net/Settings/SimpleSettingsParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections; using System.Collections.Generic; diff --git a/src/WireMock.Net/Settings/WebProxySettings.cs b/src/WireMock.Net/Settings/WebProxySettings.cs index ae317a19c..2002164bf 100644 --- a/src/WireMock.Net/Settings/WebProxySettings.cs +++ b/src/WireMock.Net/Settings/WebProxySettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using JetBrains.Annotations; namespace WireMock.Settings; diff --git a/src/WireMock.Net/Settings/WebhookSettings.cs b/src/WireMock.Net/Settings/WebhookSettings.cs index 63c6e1c02..799600330 100644 --- a/src/WireMock.Net/Settings/WebhookSettings.cs +++ b/src/WireMock.Net/Settings/WebhookSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Settings; /// diff --git a/src/WireMock.Net/Settings/WireMockCertificateSettings.cs b/src/WireMock.Net/Settings/WireMockCertificateSettings.cs index d7ac4707f..c9ae39efb 100644 --- a/src/WireMock.Net/Settings/WireMockCertificateSettings.cs +++ b/src/WireMock.Net/Settings/WireMockCertificateSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using JetBrains.Annotations; namespace WireMock.Settings; diff --git a/src/WireMock.Net/Settings/WireMockServerSettings.cs b/src/WireMock.Net/Settings/WireMockServerSettings.cs index b8abedcbb..1a788422c 100644 --- a/src/WireMock.Net/Settings/WireMockServerSettings.cs +++ b/src/WireMock.Net/Settings/WireMockServerSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Text.RegularExpressions; diff --git a/src/WireMock.Net/Settings/WireMockServerSettingsParser.cs b/src/WireMock.Net/Settings/WireMockServerSettingsParser.cs index 1e5d179eb..f58879478 100644 --- a/src/WireMock.Net/Settings/WireMockServerSettingsParser.cs +++ b/src/WireMock.Net/Settings/WireMockServerSettingsParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/Transformers/Handlebars/FileHelpers.cs b/src/WireMock.Net/Transformers/Handlebars/FileHelpers.cs index f8ac2e56c..526db683b 100644 --- a/src/WireMock.Net/Transformers/Handlebars/FileHelpers.cs +++ b/src/WireMock.Net/Transformers/Handlebars/FileHelpers.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using HandlebarsDotNet; using HandlebarsDotNet.Helpers.Attributes; using HandlebarsDotNet.Helpers.Enums; diff --git a/src/WireMock.Net/Transformers/Handlebars/HandlebarsContext.cs b/src/WireMock.Net/Transformers/Handlebars/HandlebarsContext.cs index d84a40a09..cfc998f9b 100644 --- a/src/WireMock.Net/Transformers/Handlebars/HandlebarsContext.cs +++ b/src/WireMock.Net/Transformers/Handlebars/HandlebarsContext.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using HandlebarsDotNet; using HandlebarsDotNet.Helpers.Extensions; using Stef.Validation; diff --git a/src/WireMock.Net/Transformers/Handlebars/HandlebarsContextFactory.cs b/src/WireMock.Net/Transformers/Handlebars/HandlebarsContextFactory.cs index 631e53fc7..1c9111353 100644 --- a/src/WireMock.Net/Transformers/Handlebars/HandlebarsContextFactory.cs +++ b/src/WireMock.Net/Transformers/Handlebars/HandlebarsContextFactory.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using HandlebarsDotNet; using Stef.Validation; using WireMock.Settings; diff --git a/src/WireMock.Net/Transformers/Handlebars/IHandlebarsContext.cs b/src/WireMock.Net/Transformers/Handlebars/IHandlebarsContext.cs index 964290f82..d6a5f7e22 100644 --- a/src/WireMock.Net/Transformers/Handlebars/IHandlebarsContext.cs +++ b/src/WireMock.Net/Transformers/Handlebars/IHandlebarsContext.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using HandlebarsDotNet; namespace WireMock.Transformers.Handlebars; diff --git a/src/WireMock.Net/Transformers/Handlebars/WireMockHandlebarsHelpers.cs b/src/WireMock.Net/Transformers/Handlebars/WireMockHandlebarsHelpers.cs index 7565b819f..cd78de47b 100644 --- a/src/WireMock.Net/Transformers/Handlebars/WireMockHandlebarsHelpers.cs +++ b/src/WireMock.Net/Transformers/Handlebars/WireMockHandlebarsHelpers.cs @@ -1,4 +1,6 @@ -using System.Collections.Generic; +// Copyright © WireMock.Net + +using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; diff --git a/src/WireMock.Net/Transformers/ITransformer.cs b/src/WireMock.Net/Transformers/ITransformer.cs index 026f7bbcf..8b3635807 100644 --- a/src/WireMock.Net/Transformers/ITransformer.cs +++ b/src/WireMock.Net/Transformers/ITransformer.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using WireMock.Types; using WireMock.Util; diff --git a/src/WireMock.Net/Transformers/ITransformerContext.cs b/src/WireMock.Net/Transformers/ITransformerContext.cs index 67bfd74f9..0c460fad0 100644 --- a/src/WireMock.Net/Transformers/ITransformerContext.cs +++ b/src/WireMock.Net/Transformers/ITransformerContext.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Handlers; namespace WireMock.Transformers; diff --git a/src/WireMock.Net/Transformers/ITransformerContextFactory.cs b/src/WireMock.Net/Transformers/ITransformerContextFactory.cs index dd345be2e..68c1772c9 100644 --- a/src/WireMock.Net/Transformers/ITransformerContextFactory.cs +++ b/src/WireMock.Net/Transformers/ITransformerContextFactory.cs @@ -1,4 +1,6 @@ -namespace WireMock.Transformers +// Copyright © WireMock.Net + +namespace WireMock.Transformers { interface ITransformerContextFactory { diff --git a/src/WireMock.Net/Transformers/Scriban/ScribanContext.cs b/src/WireMock.Net/Transformers/Scriban/ScribanContext.cs index aee169de8..21190b90a 100644 --- a/src/WireMock.Net/Transformers/Scriban/ScribanContext.cs +++ b/src/WireMock.Net/Transformers/Scriban/ScribanContext.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Scriban; using Stef.Validation; using WireMock.Handlers; diff --git a/src/WireMock.Net/Transformers/Scriban/ScribanContextFactory.cs b/src/WireMock.Net/Transformers/Scriban/ScribanContextFactory.cs index 15c93e040..d50f97372 100644 --- a/src/WireMock.Net/Transformers/Scriban/ScribanContextFactory.cs +++ b/src/WireMock.Net/Transformers/Scriban/ScribanContextFactory.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using WireMock.Handlers; using WireMock.Types; using Stef.Validation; diff --git a/src/WireMock.Net/Transformers/Scriban/WireMockListAccessor.cs b/src/WireMock.Net/Transformers/Scriban/WireMockListAccessor.cs index 2fdd4a391..e578ca067 100644 --- a/src/WireMock.Net/Transformers/Scriban/WireMockListAccessor.cs +++ b/src/WireMock.Net/Transformers/Scriban/WireMockListAccessor.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using Scriban; diff --git a/src/WireMock.Net/Transformers/Scriban/WireMockTemplateContext.cs b/src/WireMock.Net/Transformers/Scriban/WireMockTemplateContext.cs index cd71285c5..ed73b36cd 100644 --- a/src/WireMock.Net/Transformers/Scriban/WireMockTemplateContext.cs +++ b/src/WireMock.Net/Transformers/Scriban/WireMockTemplateContext.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Scriban; using Scriban.Runtime; using WireMock.Types; diff --git a/src/WireMock.Net/Transformers/TransformModel.cs b/src/WireMock.Net/Transformers/TransformModel.cs index d2bdbdd77..95c32db3c 100644 --- a/src/WireMock.Net/Transformers/TransformModel.cs +++ b/src/WireMock.Net/Transformers/TransformModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Diagnostics.CodeAnalysis; namespace WireMock.Transformers; diff --git a/src/WireMock.Net/Transformers/Transformer.cs b/src/WireMock.Net/Transformers/Transformer.cs index d2ff5158b..0e87813cb 100644 --- a/src/WireMock.Net/Transformers/Transformer.cs +++ b/src/WireMock.Net/Transformers/Transformer.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/src/WireMock.Net/Util/BodyParser.cs b/src/WireMock.Net/Util/BodyParser.cs index e285461d7..12715c762 100644 --- a/src/WireMock.Net/Util/BodyParser.cs +++ b/src/WireMock.Net/Util/BodyParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/WireMock.Net/Util/BodyParserSettings.cs b/src/WireMock.Net/Util/BodyParserSettings.cs index 2ac5f8780..a9ddef6d6 100644 --- a/src/WireMock.Net/Util/BodyParserSettings.cs +++ b/src/WireMock.Net/Util/BodyParserSettings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; namespace WireMock.Util; diff --git a/src/WireMock.Net/Util/BytesEncodingUtils.cs b/src/WireMock.Net/Util/BytesEncodingUtils.cs index 9dc854fd2..727720fb1 100644 --- a/src/WireMock.Net/Util/BytesEncodingUtils.cs +++ b/src/WireMock.Net/Util/BytesEncodingUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/Util/CSharpFormatter.cs b/src/WireMock.Net/Util/CSharpFormatter.cs index 425c8e4dc..5f979ebe6 100644 --- a/src/WireMock.Net/Util/CSharpFormatter.cs +++ b/src/WireMock.Net/Util/CSharpFormatter.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Globalization; diff --git a/src/WireMock.Net/Util/CompressionUtils.cs b/src/WireMock.Net/Util/CompressionUtils.cs index 40da363cf..f38f7da1b 100644 --- a/src/WireMock.Net/Util/CompressionUtils.cs +++ b/src/WireMock.Net/Util/CompressionUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using System.IO.Compression; diff --git a/src/WireMock.Net/Util/ConcurrentObservableCollection.cs b/src/WireMock.Net/Util/ConcurrentObservableCollection.cs index fdfcdba57..af4c51164 100644 --- a/src/WireMock.Net/Util/ConcurrentObservableCollection.cs +++ b/src/WireMock.Net/Util/ConcurrentObservableCollection.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; diff --git a/src/WireMock.Net/Util/CultureInfoExtensions.cs b/src/WireMock.Net/Util/CultureInfoExtensions.cs index 2469804e1..e32570d0e 100644 --- a/src/WireMock.Net/Util/CultureInfoExtensions.cs +++ b/src/WireMock.Net/Util/CultureInfoExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Globalization; diff --git a/src/WireMock.Net/Util/DateTimeUtils.cs b/src/WireMock.Net/Util/DateTimeUtils.cs index 8170aea76..1d09e6c77 100644 --- a/src/WireMock.Net/Util/DateTimeUtils.cs +++ b/src/WireMock.Net/Util/DateTimeUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Util; diff --git a/src/WireMock.Net/Util/DictionaryExtensions.cs b/src/WireMock.Net/Util/DictionaryExtensions.cs index 4d92d4631..4f7371439 100644 --- a/src/WireMock.Net/Util/DictionaryExtensions.cs +++ b/src/WireMock.Net/Util/DictionaryExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using Stef.Validation; diff --git a/src/WireMock.Net/Util/EnhancedFileSystemWatcher.cs b/src/WireMock.Net/Util/EnhancedFileSystemWatcher.cs index 599d643da..72022a0da 100644 --- a/src/WireMock.Net/Util/EnhancedFileSystemWatcher.cs +++ b/src/WireMock.Net/Util/EnhancedFileSystemWatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using System.IO; diff --git a/src/WireMock.Net/Util/FileHelper.cs b/src/WireMock.Net/Util/FileHelper.cs index 99a80cbbf..c84a1a36d 100644 --- a/src/WireMock.Net/Util/FileHelper.cs +++ b/src/WireMock.Net/Util/FileHelper.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Diagnostics.CodeAnalysis; using System.Threading; using Stef.Validation; diff --git a/src/WireMock.Net/Util/GuidUtils.cs b/src/WireMock.Net/Util/GuidUtils.cs index 53892407f..9f3be53ed 100644 --- a/src/WireMock.Net/Util/GuidUtils.cs +++ b/src/WireMock.Net/Util/GuidUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; namespace WireMock.Util; diff --git a/src/WireMock.Net/Util/HttpStatusRangeParser.cs b/src/WireMock.Net/Util/HttpStatusRangeParser.cs index 3d74f8d92..9d7cfe37e 100644 --- a/src/WireMock.Net/Util/HttpStatusRangeParser.cs +++ b/src/WireMock.Net/Util/HttpStatusRangeParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net; diff --git a/src/WireMock.Net/Util/HttpVersionParser.cs b/src/WireMock.Net/Util/HttpVersionParser.cs index aeb42757e..41a9fd0d0 100644 --- a/src/WireMock.Net/Util/HttpVersionParser.cs +++ b/src/WireMock.Net/Util/HttpVersionParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text.RegularExpressions; using Stef.Validation; diff --git a/src/WireMock.Net/Util/JsonUtils.cs b/src/WireMock.Net/Util/JsonUtils.cs index 104fecece..e47bee0ca 100644 --- a/src/WireMock.Net/Util/JsonUtils.cs +++ b/src/WireMock.Net/Util/JsonUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/Util/MimeKitUtils.cs b/src/WireMock.Net/Util/MimeKitUtils.cs index 9bb5126e4..91e224147 100644 --- a/src/WireMock.Net/Util/MimeKitUtils.cs +++ b/src/WireMock.Net/Util/MimeKitUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if MIMEKIT using System; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/Util/PathUtils.cs b/src/WireMock.Net/Util/PathUtils.cs index b3c3e0a19..2ea460ff5 100644 --- a/src/WireMock.Net/Util/PathUtils.cs +++ b/src/WireMock.Net/Util/PathUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using Stef.Validation; diff --git a/src/WireMock.Net/Util/PortUtils.cs b/src/WireMock.Net/Util/PortUtils.cs index cfd6eec70..9d76c95de 100644 --- a/src/WireMock.Net/Util/PortUtils.cs +++ b/src/WireMock.Net/Util/PortUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Diagnostics.CodeAnalysis; using System.Net; diff --git a/src/WireMock.Net/Util/ProtoBufUtils.cs b/src/WireMock.Net/Util/ProtoBufUtils.cs index 44a5d07ce..fe6bddedb 100644 --- a/src/WireMock.Net/Util/ProtoBufUtils.cs +++ b/src/WireMock.Net/Util/ProtoBufUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if PROTOBUF using System; using System.Threading; diff --git a/src/WireMock.Net/Util/QueryStringParser.cs b/src/WireMock.Net/Util/QueryStringParser.cs index d0c9c3909..9a0c933fd 100644 --- a/src/WireMock.Net/Util/QueryStringParser.cs +++ b/src/WireMock.Net/Util/QueryStringParser.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/Util/ReflectionUtils.cs b/src/WireMock.Net/Util/ReflectionUtils.cs index 0fcad1761..0d4720a2c 100644 --- a/src/WireMock.Net/Util/ReflectionUtils.cs +++ b/src/WireMock.Net/Util/ReflectionUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using System.Linq; diff --git a/src/WireMock.Net/Util/RegexUtils.cs b/src/WireMock.Net/Util/RegexUtils.cs index 10d268e03..c64ef4bdd 100644 --- a/src/WireMock.Net/Util/RegexUtils.cs +++ b/src/WireMock.Net/Util/RegexUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Text.RegularExpressions; diff --git a/src/WireMock.Net/Util/SingletonFactory.cs b/src/WireMock.Net/Util/SingletonFactory.cs index 2899ecbe2..b06e38ac9 100644 --- a/src/WireMock.Net/Util/SingletonFactory.cs +++ b/src/WireMock.Net/Util/SingletonFactory.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Util; internal static class SingletonLock diff --git a/src/WireMock.Net/Util/StreamUtils.cs b/src/WireMock.Net/Util/StreamUtils.cs index df0b28655..b52564534 100644 --- a/src/WireMock.Net/Util/StreamUtils.cs +++ b/src/WireMock.Net/Util/StreamUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Text; diff --git a/src/WireMock.Net/Util/StringUtils.cs b/src/WireMock.Net/Util/StringUtils.cs index 586781d76..6b982a518 100644 --- a/src/WireMock.Net/Util/StringUtils.cs +++ b/src/WireMock.Net/Util/StringUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Diagnostics.CodeAnalysis; using System.Linq; diff --git a/src/WireMock.Net/Util/SystemUtils.cs b/src/WireMock.Net/Util/SystemUtils.cs index bc9fe559a..2862fa552 100644 --- a/src/WireMock.Net/Util/SystemUtils.cs +++ b/src/WireMock.Net/Util/SystemUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Reflection; namespace WireMock.Util; diff --git a/src/WireMock.Net/Util/TinyMapperUtils.cs b/src/WireMock.Net/Util/TinyMapperUtils.cs index 52c74f746..9077c457f 100644 --- a/src/WireMock.Net/Util/TinyMapperUtils.cs +++ b/src/WireMock.Net/Util/TinyMapperUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Nelibur.ObjectMapper; using WireMock.Admin.Mappings; using WireMock.Admin.Settings; diff --git a/src/WireMock.Net/Util/TypeLoader.cs b/src/WireMock.Net/Util/TypeLoader.cs index fcd27e779..23e8e6333 100644 --- a/src/WireMock.Net/Util/TypeLoader.cs +++ b/src/WireMock.Net/Util/TypeLoader.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; diff --git a/src/WireMock.Net/Util/UrlUtils.cs b/src/WireMock.Net/Util/UrlUtils.cs index 9f9ca76f9..6c5eefad0 100644 --- a/src/WireMock.Net/Util/UrlUtils.cs +++ b/src/WireMock.Net/Util/UrlUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using WireMock.Models; using Stef.Validation; diff --git a/src/WireMock.Net/WireMock.Net.csproj b/src/WireMock.Net/WireMock.Net.csproj index 246a4ec31..ae1885ed6 100644 --- a/src/WireMock.Net/WireMock.Net.csproj +++ b/src/WireMock.Net/WireMock.Net.csproj @@ -59,9 +59,7 @@ - - diff --git a/src/WireMock.Org.Abstractions/GetAdminMappingsByStubMappingIdResult.cs b/src/WireMock.Org.Abstractions/GetAdminMappingsByStubMappingIdResult.cs index 78900e399..dd0f545a1 100644 --- a/src/WireMock.Org.Abstractions/GetAdminMappingsByStubMappingIdResult.cs +++ b/src/WireMock.Org.Abstractions/GetAdminMappingsByStubMappingIdResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class GetAdminMappingsByStubMappingIdResult diff --git a/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs b/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs index 25861b341..47ea11b23 100644 --- a/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs +++ b/src/WireMock.Org.Abstractions/GetAdminMappingsResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions; public class GetAdminMappingsResult diff --git a/src/WireMock.Org.Abstractions/GetAdminRecordingsStatusResult.cs b/src/WireMock.Org.Abstractions/GetAdminRecordingsStatusResult.cs index 6d97044b5..8a14e7d37 100644 --- a/src/WireMock.Org.Abstractions/GetAdminRecordingsStatusResult.cs +++ b/src/WireMock.Org.Abstractions/GetAdminRecordingsStatusResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class GetAdminRecordingsStatusResult diff --git a/src/WireMock.Org.Abstractions/GetAdminRequestsUnmatchedNearMissesResult.cs b/src/WireMock.Org.Abstractions/GetAdminRequestsUnmatchedNearMissesResult.cs index 0e189fef6..002c0d608 100644 --- a/src/WireMock.Org.Abstractions/GetAdminRequestsUnmatchedNearMissesResult.cs +++ b/src/WireMock.Org.Abstractions/GetAdminRequestsUnmatchedNearMissesResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class GetAdminRequestsUnmatchedNearMissesResult diff --git a/src/WireMock.Org.Abstractions/GetAdminScenariosResult.cs b/src/WireMock.Org.Abstractions/GetAdminScenariosResult.cs index c25cf1b16..7ee9c3905 100644 --- a/src/WireMock.Org.Abstractions/GetAdminScenariosResult.cs +++ b/src/WireMock.Org.Abstractions/GetAdminScenariosResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class GetAdminScenariosResult diff --git a/src/WireMock.Org.Abstractions/Mapping.cs b/src/WireMock.Org.Abstractions/Mapping.cs index 3ca4e26fe..0e0cb67f2 100644 --- a/src/WireMock.Org.Abstractions/Mapping.cs +++ b/src/WireMock.Org.Abstractions/Mapping.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions; public class Mapping diff --git a/src/WireMock.Org.Abstractions/MappingsRequest.cs b/src/WireMock.Org.Abstractions/MappingsRequest.cs index acbddc1fa..139c529c0 100644 --- a/src/WireMock.Org.Abstractions/MappingsRequest.cs +++ b/src/WireMock.Org.Abstractions/MappingsRequest.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class MappingsRequest diff --git a/src/WireMock.Org.Abstractions/MappingsRequestBasicAuthCredentials.cs b/src/WireMock.Org.Abstractions/MappingsRequestBasicAuthCredentials.cs index 476c8c29a..52e5b5543 100644 --- a/src/WireMock.Org.Abstractions/MappingsRequestBasicAuthCredentials.cs +++ b/src/WireMock.Org.Abstractions/MappingsRequestBasicAuthCredentials.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { /// diff --git a/src/WireMock.Org.Abstractions/MappingsResponse.cs b/src/WireMock.Org.Abstractions/MappingsResponse.cs index 1c33bb064..d95b2dd13 100644 --- a/src/WireMock.Org.Abstractions/MappingsResponse.cs +++ b/src/WireMock.Org.Abstractions/MappingsResponse.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class MappingsResponse diff --git a/src/WireMock.Org.Abstractions/MappingsResponseFaultConstants.cs b/src/WireMock.Org.Abstractions/MappingsResponseFaultConstants.cs index 60d75fed7..73f097d34 100644 --- a/src/WireMock.Org.Abstractions/MappingsResponseFaultConstants.cs +++ b/src/WireMock.Org.Abstractions/MappingsResponseFaultConstants.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions; /// diff --git a/src/WireMock.Org.Abstractions/Meta.cs b/src/WireMock.Org.Abstractions/Meta.cs index 938c64055..9b9512b7a 100644 --- a/src/WireMock.Org.Abstractions/Meta.cs +++ b/src/WireMock.Org.Abstractions/Meta.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class Meta diff --git a/src/WireMock.Org.Abstractions/NearMisses.cs b/src/WireMock.Org.Abstractions/NearMisses.cs index 1042eb36a..eb1ed96af 100644 --- a/src/WireMock.Org.Abstractions/NearMisses.cs +++ b/src/WireMock.Org.Abstractions/NearMisses.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class NearMisses diff --git a/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs b/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs index af6116fbe..fdea99278 100644 --- a/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminMappingsFindByMetadataResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions; public class PostAdminMappingsFindByMetadataResult diff --git a/src/WireMock.Org.Abstractions/PostAdminMappingsResult.cs b/src/WireMock.Org.Abstractions/PostAdminMappingsResult.cs index 8ba3bedba..9f32c90ea 100644 --- a/src/WireMock.Org.Abstractions/PostAdminMappingsResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminMappingsResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class PostAdminMappingsResult diff --git a/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestPatternResult.cs b/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestPatternResult.cs index cd14a90a4..d92a327d5 100644 --- a/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestPatternResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestPatternResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class PostAdminNearMissesRequestPatternResult diff --git a/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestResult.cs b/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestResult.cs index ce8998883..8f8e64417 100644 --- a/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminNearMissesRequestResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class PostAdminNearMissesRequestResult diff --git a/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs b/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs index 88ccbd526..1d436aaad 100644 --- a/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminRecordingsSnapshotResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions; public class PostAdminRecordingsSnapshotResult diff --git a/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs b/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs index 98264b006..dd79136ef 100644 --- a/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminRecordingsStopResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions; public class PostAdminRecordingsStopResult diff --git a/src/WireMock.Org.Abstractions/PostAdminRequestsCountResult.cs b/src/WireMock.Org.Abstractions/PostAdminRequestsCountResult.cs index d8c36dded..03dc74405 100644 --- a/src/WireMock.Org.Abstractions/PostAdminRequestsCountResult.cs +++ b/src/WireMock.Org.Abstractions/PostAdminRequestsCountResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class PostAdminRequestsCountResult diff --git a/src/WireMock.Org.Abstractions/PutAdminMappingsByStubMappingIdResult.cs b/src/WireMock.Org.Abstractions/PutAdminMappingsByStubMappingIdResult.cs index 166e20465..199560696 100644 --- a/src/WireMock.Org.Abstractions/PutAdminMappingsByStubMappingIdResult.cs +++ b/src/WireMock.Org.Abstractions/PutAdminMappingsByStubMappingIdResult.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class PutAdminMappingsByStubMappingIdResult diff --git a/src/WireMock.Org.Abstractions/Request.cs b/src/WireMock.Org.Abstractions/Request.cs index a76beb34a..11896555f 100644 --- a/src/WireMock.Org.Abstractions/Request.cs +++ b/src/WireMock.Org.Abstractions/Request.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class WireMockOrgRequest diff --git a/src/WireMock.Org.Abstractions/RequestBasicAuthCredentials.cs b/src/WireMock.Org.Abstractions/RequestBasicAuthCredentials.cs index 57a82c5e6..c400faa9a 100644 --- a/src/WireMock.Org.Abstractions/RequestBasicAuthCredentials.cs +++ b/src/WireMock.Org.Abstractions/RequestBasicAuthCredentials.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { /// diff --git a/src/WireMock.Org.Abstractions/Response.cs b/src/WireMock.Org.Abstractions/Response.cs index d6d91b0f5..7f835b33c 100644 --- a/src/WireMock.Org.Abstractions/Response.cs +++ b/src/WireMock.Org.Abstractions/Response.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class WireMockOrgResponse diff --git a/src/WireMock.Org.Abstractions/ResponseFaultConstants.cs b/src/WireMock.Org.Abstractions/ResponseFaultConstants.cs index 85c9f9d5b..19b49f860 100644 --- a/src/WireMock.Org.Abstractions/ResponseFaultConstants.cs +++ b/src/WireMock.Org.Abstractions/ResponseFaultConstants.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { /// diff --git a/src/WireMock.Org.Abstractions/Scenarios.cs b/src/WireMock.Org.Abstractions/Scenarios.cs index bcb57e527..7b3449bd5 100644 --- a/src/WireMock.Org.Abstractions/Scenarios.cs +++ b/src/WireMock.Org.Abstractions/Scenarios.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public class Scenarios diff --git a/src/WireMock.Org.Abstractions/StatusConstants.cs b/src/WireMock.Org.Abstractions/StatusConstants.cs index 830105b10..1e23e4d1a 100644 --- a/src/WireMock.Org.Abstractions/StatusConstants.cs +++ b/src/WireMock.Org.Abstractions/StatusConstants.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace WireMock.Org.Abstractions { public static class StatusConstants diff --git a/src/WireMock.Org.Abstractions/WireMock.Org.Abstractions.csproj b/src/WireMock.Org.Abstractions/WireMock.Org.Abstractions.csproj index 1313607c7..d87b02e41 100644 --- a/src/WireMock.Org.Abstractions/WireMock.Org.Abstractions.csproj +++ b/src/WireMock.Org.Abstractions/WireMock.Org.Abstractions.csproj @@ -31,10 +31,4 @@ true - - - - - - \ No newline at end of file diff --git a/src/WireMock.Org.RestClient/IWireMockOrgApi.cs b/src/WireMock.Org.RestClient/IWireMockOrgApi.cs index 57a98eae7..ebf5b2560 100644 --- a/src/WireMock.Org.RestClient/IWireMockOrgApi.cs +++ b/src/WireMock.Org.RestClient/IWireMockOrgApi.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using AnyOfTypes; using RestEase; diff --git a/src/WireMock.Org.RestClient/WireMock.Org.RestClient.csproj b/src/WireMock.Org.RestClient/WireMock.Org.RestClient.csproj index b18b8056c..a6de3c8cd 100644 --- a/src/WireMock.Org.RestClient/WireMock.Org.RestClient.csproj +++ b/src/WireMock.Org.RestClient/WireMock.Org.RestClient.csproj @@ -31,7 +31,6 @@ - diff --git a/src/dotnet-WireMock.Net/Program.cs b/src/dotnet-WireMock.Net/Program.cs index d5200badd..69cb172a9 100644 --- a/src/dotnet-WireMock.Net/Program.cs +++ b/src/dotnet-WireMock.Net/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Microsoft.Extensions.Logging; diff --git a/src/dotnet-WireMock.Net/WireMockLogger.cs b/src/dotnet-WireMock.Net/WireMockLogger.cs index 535feb67c..1115e28d0 100644 --- a/src/dotnet-WireMock.Net/WireMockLogger.cs +++ b/src/dotnet-WireMock.Net/WireMockLogger.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text.Json; using Microsoft.Extensions.Logging; @@ -47,7 +49,7 @@ public void Error(string formatString, params object[] args) /// public void Error(string formatString, Exception exception) { - _logger.LogError(formatString, exception); + _logger.LogError(exception, formatString); } /// diff --git a/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.GetMappingsAsync.cs b/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.GetMappingsAsync.cs index 637db397b..61d008729 100644 --- a/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.GetMappingsAsync.cs +++ b/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.GetMappingsAsync.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System.Threading.Tasks; using RestEase; diff --git a/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.cs b/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.cs index 808963235..9fb83ccbf 100644 --- a/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.cs +++ b/test/WireMock.Net.Tests/AdminApi/WireMockAdminApiTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System; using System.Collections.Generic; diff --git a/test/WireMock.Net.Tests/Client/Builders/AdminApiMappingBuilderTests.cs b/test/WireMock.Net.Tests/Client/Builders/AdminApiMappingBuilderTests.cs index 5679f662a..48e354e7a 100644 --- a/test/WireMock.Net.Tests/Client/Builders/AdminApiMappingBuilderTests.cs +++ b/test/WireMock.Net.Tests/Client/Builders/AdminApiMappingBuilderTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System; using System.Diagnostics.CodeAnalysis; diff --git a/test/WireMock.Net.Tests/Extensions/DictionaryExtensionsTests.cs b/test/WireMock.Net.Tests/Extensions/DictionaryExtensionsTests.cs index 55934f851..a0a9f29d3 100644 --- a/test/WireMock.Net.Tests/Extensions/DictionaryExtensionsTests.cs +++ b/test/WireMock.Net.Tests/Extensions/DictionaryExtensionsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections; using FluentAssertions; using WireMock.Extensions; diff --git a/test/WireMock.Net.Tests/Extensions/EnumExtensionsTests.cs b/test/WireMock.Net.Tests/Extensions/EnumExtensionsTests.cs index ef9fae20b..a9abb3cdb 100644 --- a/test/WireMock.Net.Tests/Extensions/EnumExtensionsTests.cs +++ b/test/WireMock.Net.Tests/Extensions/EnumExtensionsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using FluentAssertions; using WireMock.Extensions; diff --git a/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsExtensions.cs b/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsExtensions.cs index 1ee9c27bd..81ced28ed 100644 --- a/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsExtensions.cs +++ b/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsTests.cs b/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsTests.cs index 455535bcd..90eab6ccc 100644 --- a/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsTests.cs +++ b/test/WireMock.Net.Tests/FluentAssertions/WireMockAssertionsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net; diff --git a/test/WireMock.Net.Tests/Grpc/WireMockServerTests.Grpc.cs b/test/WireMock.Net.Tests/Grpc/WireMockServerTests.Grpc.cs index 78d4d1e00..b76200ee0 100644 --- a/test/WireMock.Net.Tests/Grpc/WireMockServerTests.Grpc.cs +++ b/test/WireMock.Net.Tests/Grpc/WireMockServerTests.Grpc.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if PROTOBUF using System; using System.Net; diff --git a/test/WireMock.Net.Tests/Handlers/LocalFileSystemHandlerTests.cs b/test/WireMock.Net.Tests/Handlers/LocalFileSystemHandlerTests.cs index 1e9accc8b..6bdfd340c 100644 --- a/test/WireMock.Net.Tests/Handlers/LocalFileSystemHandlerTests.cs +++ b/test/WireMock.Net.Tests/Handlers/LocalFileSystemHandlerTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using NFluent; diff --git a/test/WireMock.Net.Tests/Http/ByteArrayContentHelperTests.cs b/test/WireMock.Net.Tests/Http/ByteArrayContentHelperTests.cs index 4e3e436f5..307f04815 100644 --- a/test/WireMock.Net.Tests/Http/ByteArrayContentHelperTests.cs +++ b/test/WireMock.Net.Tests/Http/ByteArrayContentHelperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net.Http.Headers; using System.Text; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs b/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs index 788f856f9..b356e40f4 100644 --- a/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs +++ b/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Text; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Http/StringContentHelperTests.cs b/test/WireMock.Net.Tests/Http/StringContentHelperTests.cs index c5f0fff8a..c3abf9987 100644 --- a/test/WireMock.Net.Tests/Http/StringContentHelperTests.cs +++ b/test/WireMock.Net.Tests/Http/StringContentHelperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net.Http.Headers; using FluentAssertions; using WireMock.Http; diff --git a/test/WireMock.Net.Tests/MappingBuilderTests.cs b/test/WireMock.Net.Tests/MappingBuilderTests.cs index f07708549..0b798c8ec 100644 --- a/test/WireMock.Net.Tests/MappingBuilderTests.cs +++ b/test/WireMock.Net.Tests/MappingBuilderTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Matchers/CSharpCodeMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/CSharpCodeMatcherTests.cs index fb7466cec..4465e3c74 100644 --- a/test/WireMock.Net.Tests/Matchers/CSharpCodeMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/CSharpCodeMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/Matchers/ContentTypeMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/ContentTypeMatcherTests.cs index 1f27964ce..65a4313cf 100644 --- a/test/WireMock.Net.Tests/Matchers/ContentTypeMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/ContentTypeMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/Matchers/ExactMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/ExactMatcherTests.cs index 38efb3458..73beafa28 100644 --- a/test/WireMock.Net.Tests/Matchers/ExactMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/ExactMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Matchers; using Xunit; diff --git a/test/WireMock.Net.Tests/Matchers/ExactObjectMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/ExactObjectMatcherTests.cs index 6bb9eaafa..5ddc7bb52 100644 --- a/test/WireMock.Net.Tests/Matchers/ExactObjectMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/ExactObjectMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Matchers; using Xunit; diff --git a/test/WireMock.Net.Tests/Matchers/GraphQLMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/GraphQLMatcherTests.cs index f907c4b1e..ac1ddfb32 100644 --- a/test/WireMock.Net.Tests/Matchers/GraphQLMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/GraphQLMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if GRAPHQL using System; using System.Collections.Generic; diff --git a/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs index 547ee89f6..8dbcbc4f2 100644 --- a/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JmesPathMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using FluentAssertions; using Newtonsoft.Json.Linq; diff --git a/test/WireMock.Net.Tests/Matchers/JsonMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JsonMatcherTests.cs index 257f23af4..ed529e85a 100644 --- a/test/WireMock.Net.Tests/Matchers/JsonMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JsonMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Matchers/JsonPartialMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JsonPartialMatcherTests.cs index 01b610b15..0b3ff78fb 100644 --- a/test/WireMock.Net.Tests/Matchers/JsonPartialMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JsonPartialMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Matchers/JsonPartialWildcardMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JsonPartialWildcardMatcherTests.cs index 6dc88db6f..d8009ac85 100644 --- a/test/WireMock.Net.Tests/Matchers/JsonPartialWildcardMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JsonPartialWildcardMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs index 304542525..3612cabc4 100644 --- a/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using FluentAssertions; using Newtonsoft.Json.Linq; diff --git a/test/WireMock.Net.Tests/Matchers/LinqMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/LinqMatcherTests.cs index 483ebbadc..3d283d8fc 100644 --- a/test/WireMock.Net.Tests/Matchers/LinqMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/LinqMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using Newtonsoft.Json.Linq; using NFluent; diff --git a/test/WireMock.Net.Tests/Matchers/MatchBehaviourHelperTests.cs b/test/WireMock.Net.Tests/Matchers/MatchBehaviourHelperTests.cs index d4da50e0c..90f4bb6f0 100644 --- a/test/WireMock.Net.Tests/Matchers/MatchBehaviourHelperTests.cs +++ b/test/WireMock.Net.Tests/Matchers/MatchBehaviourHelperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Matchers; using Xunit; diff --git a/test/WireMock.Net.Tests/Matchers/MimePartMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/MimePartMatcherTests.cs index 8d15be654..e9e4ade44 100644 --- a/test/WireMock.Net.Tests/Matchers/MimePartMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/MimePartMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if MIMEKIT using System; using System.Linq; diff --git a/test/WireMock.Net.Tests/Matchers/Models/WireMockCustomScalarGraphTypeTests.cs b/test/WireMock.Net.Tests/Matchers/Models/WireMockCustomScalarGraphTypeTests.cs index 574c1e4f9..cce687e45 100644 --- a/test/WireMock.Net.Tests/Matchers/Models/WireMockCustomScalarGraphTypeTests.cs +++ b/test/WireMock.Net.Tests/Matchers/Models/WireMockCustomScalarGraphTypeTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if GRAPHQL using System; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Matchers/NotNullOrEmptyMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/NotNullOrEmptyMatcherTests.cs index 311434c97..9e8a89a65 100644 --- a/test/WireMock.Net.Tests/Matchers/NotNullOrEmptyMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/NotNullOrEmptyMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/Matchers/ProtoBufMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/ProtoBufMatcherTests.cs index b6f809d22..975a9d4be 100644 --- a/test/WireMock.Net.Tests/Matchers/ProtoBufMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/ProtoBufMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if PROTOBUF using System; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Matchers/RegexMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/RegexMatcherTests.cs index 0726e2ea2..2e79a6732 100644 --- a/test/WireMock.Net.Tests/Matchers/RegexMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/RegexMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using FluentAssertions; using NFluent; diff --git a/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs b/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs index 42a51c540..b9dc9abe2 100644 --- a/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs +++ b/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using FluentAssertions; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/Matchers/SimMetricsMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/SimMetricsMatcherTests.cs index 6e0218fb9..23bcdf849 100644 --- a/test/WireMock.Net.Tests/Matchers/SimMetricsMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/SimMetricsMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Matchers; using Xunit; diff --git a/test/WireMock.Net.Tests/Matchers/WildcardMatcherTest.cs b/test/WireMock.Net.Tests/Matchers/WildcardMatcherTest.cs index 3499a1f06..ce9b5d81c 100644 --- a/test/WireMock.Net.Tests/Matchers/WildcardMatcherTest.cs +++ b/test/WireMock.Net.Tests/Matchers/WildcardMatcherTest.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using AnyOfTypes; using FluentAssertions; using NFluent; diff --git a/test/WireMock.Net.Tests/Matchers/XPathMatcherTests.cs b/test/WireMock.Net.Tests/Matchers/XPathMatcherTests.cs index df4d95eba..c8bb8c636 100644 --- a/test/WireMock.Net.Tests/Matchers/XPathMatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/XPathMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Admin.Mappings; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/ObservableLogEntriesTest.cs b/test/WireMock.Net.Tests/ObservableLogEntriesTest.cs index 5cd75b1da..c5db4dfb1 100644 --- a/test/WireMock.Net.Tests/ObservableLogEntriesTest.cs +++ b/test/WireMock.Net.Tests/ObservableLogEntriesTest.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Collections.Specialized; diff --git a/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs index a85bafa61..b22e74f7b 100644 --- a/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/GlobalExceptionMiddlewareTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using Moq; using NFluent; diff --git a/test/WireMock.Net.Tests/Owin/HostUrlOptionsTests.cs b/test/WireMock.Net.Tests/Owin/HostUrlOptionsTests.cs index 0ef9e6bfb..ff7be7745 100644 --- a/test/WireMock.Net.Tests/Owin/HostUrlOptionsTests.cs +++ b/test/WireMock.Net.Tests/Owin/HostUrlOptionsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Diagnostics.CodeAnalysis; using System.Linq; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs b/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs index cc60126ed..6988d2e8b 100644 --- a/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs +++ b/test/WireMock.Net.Tests/Owin/Mappers/OwinResponseMapperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.IO; diff --git a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs index 498288047..48f325e1b 100644 --- a/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs +++ b/test/WireMock.Net.Tests/Owin/MappingMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs index cfd2b222e..cb8954de8 100644 --- a/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs +++ b/test/WireMock.Net.Tests/Owin/WireMockMiddlewareTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Concurrent; using System.Linq.Expressions; diff --git a/test/WireMock.Net.Tests/Pact/PactTests.cs b/test/WireMock.Net.Tests/Pact/PactTests.cs index 8cf02a250..d0d4b30e5 100644 --- a/test/WireMock.Net.Tests/Pact/PactTests.cs +++ b/test/WireMock.Net.Tests/Pact/PactTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Net; using System.Text; diff --git a/test/WireMock.Net.Tests/RegularExpressions/RegexExtendedTests.cs b/test/WireMock.Net.Tests/RegularExpressions/RegexExtendedTests.cs index 07d3c6d46..ab280c257 100644 --- a/test/WireMock.Net.Tests/RegularExpressions/RegexExtendedTests.cs +++ b/test/WireMock.Net.Tests/RegularExpressions/RegexExtendedTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using NFluent; using WireMock.RegularExpressions; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderTests.cs index 73094505d..70f273c90 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using System.Collections.Generic; using WireMock.Matchers.Request; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs index d60c0c749..09b9de930 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderUsingMethodTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers.Request; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs index cfac7b6b2..7244147f2 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithBodyTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using FluentAssertions; using System.Collections.Generic; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithClientIPTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithClientIPTests.cs index 3cf666577..efe82a17e 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithClientIPTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithClientIPTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs index d5e079b39..35224dbe1 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithCookieTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithGraphQLSchemaTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithGraphQLSchemaTests.cs index 81ed5ef61..1654cb31e 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithGraphQLSchemaTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithGraphQLSchemaTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if GRAPHQL using System.Collections.Generic; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs index d1ebb3e1c..e35b90ed5 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithHeaderTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithMultiPartTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithMultiPartTests.cs index aa1d55371..632bac260 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithMultiPartTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithMultiPartTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if MIMEKIT using System.Collections.Generic; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithParamTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithParamTests.cs index 82d7505f7..37da5f678 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithParamTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithParamTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithPathTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithPathTests.cs index 2da23c50f..eeb1b1ee4 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithPathTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithPathTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithProtoBufTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithProtoBufTests.cs index 73b76d6f6..b547ae2a9 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithProtoBufTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithProtoBufTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if PROTOBUF using System.Collections.Generic; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithUrlTests.cs b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithUrlTests.cs index f95f0329f..d8a494423 100644 --- a/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithUrlTests.cs +++ b/test/WireMock.Net.Tests/RequestBuilders/RequestBuilderWithUrlTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs index 7fa471865..603bd0f87 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using System.Linq; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs index 58037c9cd..16ad904d0 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using Moq; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs index 85a387c6c..1bc14636a 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageGraphQLMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageGraphQLMatcherTests.cs index 570b54a34..e882ef23d 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageGraphQLMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageGraphQLMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if GRAPHQL using System.Linq; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs index 46a3b2c47..8518b60bf 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMethodMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMethodMatcherTests.cs index ab46ac501..87984948d 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMethodMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMethodMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using WireMock.Matchers; using WireMock.Matchers.Request; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMultiPartMatcher.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMultiPartMatcher.cs index dd7f1933c..26489afd7 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMultiPartMatcher.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageMultiPartMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if MIMEKIT using System; using System.Collections.Generic; diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs index 98a630d74..e8f737bb0 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/RequestMessageTests.cs b/test/WireMock.Net.Tests/RequestMessageTests.cs index 719454f8f..3a5390e89 100644 --- a/test/WireMock.Net.Tests/RequestMessageTests.cs +++ b/test/WireMock.Net.Tests/RequestMessageTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using WireMock.Models; using WireMock.Util; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs index 25fcccd3b..7f4cd3ccd 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseCreateTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using Moq; using NFluent; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyFromFileTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyFromFileTests.cs index af990c5a6..d6bd82d09 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyFromFileTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyFromFileTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Net; using System.Net.Http; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs index 52ce149ab..253d1ab82 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs index 5703d2830..db55ee3a8 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithCallbackTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Linq; using System.Net; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithFaultTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithFaultTests.cs index f74915178..f0ef363ac 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithFaultTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithFaultTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using FluentAssertions; using Moq; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsDateTimeTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsDateTimeTests.cs index 22f919cf3..84e9d169d 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsDateTimeTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsDateTimeTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsFileTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsFileTests.cs index 38a82ca28..8b3280432 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsFileTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsFileTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using HandlebarsDotNet; using Moq; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHelpersTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHelpersTests.cs index 8015aa26b..716f131f9 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHelpersTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHelpersTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using Moq; using NFluent; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHumanizerTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHumanizerTests.cs index bd7183841..a4e586950 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHumanizerTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsHumanizerTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Moq; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsJsonPathTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsJsonPathTests.cs index 4fb70594a..b8933dc82 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsJsonPathTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsJsonPathTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs index c9c00335f..24b90beb4 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRandomTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRandomTests.cs index 6492f5994..77891d76c 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRandomTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRandomTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using System.Threading.Tasks; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRegexTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRegexTests.cs index e9969d906..6109b02d6 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRegexTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsRegexTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using Moq; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXPathTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXPathTests.cs index 6b1331432..0a29a3876 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXPathTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXPathTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Threading.Tasks; using System.Xml; using NFluent; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXegerTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXegerTests.cs index 24cf6177b..891a915e5 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXegerTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsXegerTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using Moq; using Newtonsoft.Json.Linq; using NFluent; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs index 9428dc45c..8e058d604 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHeadersTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Threading.Tasks; using Moq; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithProxyTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithProxyTests.cs index 8a26171a3..ba66619bd 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithProxyTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithProxyTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Net.Http; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithScribanTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithScribanTests.cs index d0e8db922..0578572b6 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithScribanTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithScribanTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Threading.Tasks; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithStatusCodeTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithStatusCodeTests.cs index 8a37faf91..ed61213dc 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithStatusCodeTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithStatusCodeTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using Moq; using System.Net; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithTransformerTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithTransformerTests.cs index d5a4dc262..ae205fe8b 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithTransformerTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithTransformerTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Text; diff --git a/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcher.cs b/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcher.cs index fadb32e61..49095b624 100644 --- a/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcher.cs +++ b/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcher.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Linq; diff --git a/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcherModel.cs b/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcherModel.cs index 253d4dcf1..167225a35 100644 --- a/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcherModel.cs +++ b/test/WireMock.Net.Tests/Serialization/CustomPathParamMatcherModel.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; namespace WireMock.Net.Tests.Serialization diff --git a/test/WireMock.Net.Tests/Serialization/LogEntryMapperTests.cs b/test/WireMock.Net.Tests/Serialization/LogEntryMapperTests.cs index 8b98903b8..1045ae7dc 100644 --- a/test/WireMock.Net.Tests/Serialization/LogEntryMapperTests.cs +++ b/test/WireMock.Net.Tests/Serialization/LogEntryMapperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461) using System.Threading.Tasks; using VerifyTests; diff --git a/test/WireMock.Net.Tests/Serialization/MappingConverterTests.ToCSharpCode.cs b/test/WireMock.Net.Tests/Serialization/MappingConverterTests.ToCSharpCode.cs index 324393e35..57a1510bd 100644 --- a/test/WireMock.Net.Tests/Serialization/MappingConverterTests.ToCSharpCode.cs +++ b/test/WireMock.Net.Tests/Serialization/MappingConverterTests.ToCSharpCode.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Serialization/MappingConverterTests.cs b/test/WireMock.Net.Tests/Serialization/MappingConverterTests.cs index a3b39efff..d8cffa3a6 100644 --- a/test/WireMock.Net.Tests/Serialization/MappingConverterTests.cs +++ b/test/WireMock.Net.Tests/Serialization/MappingConverterTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System; using System.Collections.Generic; diff --git a/test/WireMock.Net.Tests/Serialization/MappingFileNameSanitizerTests.cs b/test/WireMock.Net.Tests/Serialization/MappingFileNameSanitizerTests.cs index 2c0db1a42..f9d3ace22 100644 --- a/test/WireMock.Net.Tests/Serialization/MappingFileNameSanitizerTests.cs +++ b/test/WireMock.Net.Tests/Serialization/MappingFileNameSanitizerTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using Moq; using WireMock.Serialization; diff --git a/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs b/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs index b81ef3964..0d3615237 100644 --- a/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs +++ b/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using AnyOfTypes; diff --git a/test/WireMock.Net.Tests/Serialization/ProxyMappingConverterTests.cs b/test/WireMock.Net.Tests/Serialization/ProxyMappingConverterTests.cs index 409b68712..dad9fe677 100644 --- a/test/WireMock.Net.Tests/Serialization/ProxyMappingConverterTests.cs +++ b/test/WireMock.Net.Tests/Serialization/ProxyMappingConverterTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Serialization/WebhookMapperTests.cs b/test/WireMock.Net.Tests/Serialization/WebhookMapperTests.cs index a6a9c0fbc..5d38c63fd 100644 --- a/test/WireMock.Net.Tests/Serialization/WebhookMapperTests.cs +++ b/test/WireMock.Net.Tests/Serialization/WebhookMapperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461 || NETCOREAPP3_1) using System.Collections.Generic; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Settings/SimpleSettingsParserTests.cs b/test/WireMock.Net.Tests/Settings/SimpleSettingsParserTests.cs index bef4ddbf2..cbbd7f088 100644 --- a/test/WireMock.Net.Tests/Settings/SimpleSettingsParserTests.cs +++ b/test/WireMock.Net.Tests/Settings/SimpleSettingsParserTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using FluentAssertions; using NFluent; diff --git a/test/WireMock.Net.Tests/Settings/WireMockServerSettingsParserTests.cs b/test/WireMock.Net.Tests/Settings/WireMockServerSettingsParserTests.cs index 492d8e5b9..56d4a2d1c 100644 --- a/test/WireMock.Net.Tests/Settings/WireMockServerSettingsParserTests.cs +++ b/test/WireMock.Net.Tests/Settings/WireMockServerSettingsParserTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using WireMock.Settings; using Xunit; diff --git a/test/WireMock.Net.Tests/StatefulBehaviorTests.cs b/test/WireMock.Net.Tests/StatefulBehaviorTests.cs index 413460ad2..fdbb353a4 100644 --- a/test/WireMock.Net.Tests/StatefulBehaviorTests.cs +++ b/test/WireMock.Net.Tests/StatefulBehaviorTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net; diff --git a/test/WireMock.Net.Tests/TestUtils.cs b/test/WireMock.Net.Tests/TestUtils.cs index 89a02f194..22b869660 100644 --- a/test/WireMock.Net.Tests/TestUtils.cs +++ b/test/WireMock.Net.Tests/TestUtils.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Reflection; diff --git a/test/WireMock.Net.Tests/Testcontainers/TestcontainersTests.cs b/test/WireMock.Net.Tests/Testcontainers/TestcontainersTests.cs index 0c588f759..c7cd2b5de 100644 --- a/test/WireMock.Net.Tests/Testcontainers/TestcontainersTests.cs +++ b/test/WireMock.Net.Tests/Testcontainers/TestcontainersTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if NET6_0_OR_GREATER using System; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/Transformers/Handlebars/HandlebarsContextFactoryTests.cs b/test/WireMock.Net.Tests/Transformers/Handlebars/HandlebarsContextFactoryTests.cs index 05b180c07..c93108ea3 100644 --- a/test/WireMock.Net.Tests/Transformers/Handlebars/HandlebarsContextFactoryTests.cs +++ b/test/WireMock.Net.Tests/Transformers/Handlebars/HandlebarsContextFactoryTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using Moq; using WireMock.Handlers; diff --git a/test/WireMock.Net.Tests/Transformers/Scriban/ScribanContextFactoryTests.cs b/test/WireMock.Net.Tests/Transformers/Scriban/ScribanContextFactoryTests.cs index 6217fbf82..6db2ad50f 100644 --- a/test/WireMock.Net.Tests/Transformers/Scriban/ScribanContextFactoryTests.cs +++ b/test/WireMock.Net.Tests/Transformers/Scriban/ScribanContextFactoryTests.cs @@ -1,4 +1,6 @@ -using System; +// Copyright © WireMock.Net + +using System; using FluentAssertions; using Moq; using WireMock.Handlers; diff --git a/test/WireMock.Net.Tests/Util/BodyParserTests.cs b/test/WireMock.Net.Tests/Util/BodyParserTests.cs index 62a061a75..c2046f35d 100644 --- a/test/WireMock.Net.Tests/Util/BodyParserTests.cs +++ b/test/WireMock.Net.Tests/Util/BodyParserTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using NFluent; using System.IO; diff --git a/test/WireMock.Net.Tests/Util/BytesEncodingUtilsTests.cs b/test/WireMock.Net.Tests/Util/BytesEncodingUtilsTests.cs index 64c09154a..3b220d62a 100644 --- a/test/WireMock.Net.Tests/Util/BytesEncodingUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/BytesEncodingUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Text; using FluentAssertions; using WireMock.Util; diff --git a/test/WireMock.Net.Tests/Util/CSharpFormatterTests.cs b/test/WireMock.Net.Tests/Util/CSharpFormatterTests.cs index d58b031e5..847869749 100644 --- a/test/WireMock.Net.Tests/Util/CSharpFormatterTests.cs +++ b/test/WireMock.Net.Tests/Util/CSharpFormatterTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using Newtonsoft.Json.Linq; using WireMock.Util; diff --git a/test/WireMock.Net.Tests/Util/CompressionUtilsTests.cs b/test/WireMock.Net.Tests/Util/CompressionUtilsTests.cs index 09a89c7ee..cdd60c4ce 100644 --- a/test/WireMock.Net.Tests/Util/CompressionUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/CompressionUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Text; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Util/CultureInfoUtilsTests.cs b/test/WireMock.Net.Tests/Util/CultureInfoUtilsTests.cs index 2dc1e0937..08102d669 100644 --- a/test/WireMock.Net.Tests/Util/CultureInfoUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/CultureInfoUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Globalization; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Util/FileHelperTests.cs b/test/WireMock.Net.Tests/Util/FileHelperTests.cs index c77f201b9..f18085528 100644 --- a/test/WireMock.Net.Tests/Util/FileHelperTests.cs +++ b/test/WireMock.Net.Tests/Util/FileHelperTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using Moq; using System; diff --git a/test/WireMock.Net.Tests/Util/HttpStatusRangeParserTests.cs b/test/WireMock.Net.Tests/Util/HttpStatusRangeParserTests.cs index 214de23c9..6e67e1ae2 100644 --- a/test/WireMock.Net.Tests/Util/HttpStatusRangeParserTests.cs +++ b/test/WireMock.Net.Tests/Util/HttpStatusRangeParserTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using System; using System.Net; diff --git a/test/WireMock.Net.Tests/Util/HttpVersionParserTests.cs b/test/WireMock.Net.Tests/Util/HttpVersionParserTests.cs index a534d27a0..1b3d356c6 100644 --- a/test/WireMock.Net.Tests/Util/HttpVersionParserTests.cs +++ b/test/WireMock.Net.Tests/Util/HttpVersionParserTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Diagnostics.CodeAnalysis; using FluentAssertions; using WireMock.Util; diff --git a/test/WireMock.Net.Tests/Util/JsonUtilsTests.cs b/test/WireMock.Net.Tests/Util/JsonUtilsTests.cs index 600d80d07..801e7f3b4 100644 --- a/test/WireMock.Net.Tests/Util/JsonUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/JsonUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Linq.Dynamic.Core; diff --git a/test/WireMock.Net.Tests/Util/PathUtilsTests.cs b/test/WireMock.Net.Tests/Util/PathUtilsTests.cs index 9550513b8..52550ca0d 100644 --- a/test/WireMock.Net.Tests/Util/PathUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/PathUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using System.IO; using WireMock.Util; diff --git a/test/WireMock.Net.Tests/Util/PortUtilsTests.cs b/test/WireMock.Net.Tests/Util/PortUtilsTests.cs index 2be4444e9..90b7777fe 100644 --- a/test/WireMock.Net.Tests/Util/PortUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/PortUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using WireMock.Util; using Xunit; diff --git a/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs b/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs index 274d1f3ef..52287f51d 100644 --- a/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs +++ b/test/WireMock.Net.Tests/Util/QueryStringParserTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using FluentAssertions; using WireMock.Types; diff --git a/test/WireMock.Net.Tests/Util/RegexUtilsTests.cs b/test/WireMock.Net.Tests/Util/RegexUtilsTests.cs index e48c34734..8e2365a66 100644 --- a/test/WireMock.Net.Tests/Util/RegexUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/RegexUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Collections.Generic; using System.Text.RegularExpressions; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Util/StringUtilsTests.cs b/test/WireMock.Net.Tests/Util/StringUtilsTests.cs index 375924fc7..f9ab27539 100644 --- a/test/WireMock.Net.Tests/Util/StringUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/StringUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using CultureAwareTesting.xUnit; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Util/SystemUtilsTests.cs b/test/WireMock.Net.Tests/Util/SystemUtilsTests.cs index ba2c7cd48..4fe60541b 100644 --- a/test/WireMock.Net.Tests/Util/SystemUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/SystemUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using WireMock.Util; using Xunit; diff --git a/test/WireMock.Net.Tests/Util/TypeLoaderTests.cs b/test/WireMock.Net.Tests/Util/TypeLoaderTests.cs index d289e5483..2a2c5c94e 100644 --- a/test/WireMock.Net.Tests/Util/TypeLoaderTests.cs +++ b/test/WireMock.Net.Tests/Util/TypeLoaderTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using AnyOfTypes; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs b/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs index f398f40f4..68fe3cfa3 100644 --- a/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs +++ b/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; #if NET452 using Microsoft.Owin; diff --git a/test/WireMock.Net.Tests/VerifyExtensions/VerifyNewtonsoftJson.cs b/test/WireMock.Net.Tests/VerifyExtensions/VerifyNewtonsoftJson.cs index eef5ab9f0..06550b05f 100644 --- a/test/WireMock.Net.Tests/VerifyExtensions/VerifyNewtonsoftJson.cs +++ b/test/WireMock.Net.Tests/VerifyExtensions/VerifyNewtonsoftJson.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461) using System.Collections.Generic; using System.Collections.Specialized; diff --git a/test/WireMock.Net.Tests/VerifyExtensions/VerifySettingsExtensions.cs b/test/WireMock.Net.Tests/VerifyExtensions/VerifySettingsExtensions.cs index 3be311c6e..2ce35ac14 100644 --- a/test/WireMock.Net.Tests/VerifyExtensions/VerifySettingsExtensions.cs +++ b/test/WireMock.Net.Tests/VerifyExtensions/VerifySettingsExtensions.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !(NET452 || NET461) using VerifyTests; diff --git a/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj b/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj index d47c90573..8ae8d0838 100644 --- a/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj +++ b/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj @@ -3,7 +3,6 @@ Stef Heyenrath net452;net461;netcoreapp3.1;net6.0;net7.0;net8.0 - 11 enable false full diff --git a/test/WireMock.Net.Tests/WireMockServer.Admin.cs b/test/WireMock.Net.Tests/WireMockServer.Admin.cs index 9b076a33b..2e80e1b9a 100644 --- a/test/WireMock.Net.Tests/WireMockServer.Admin.cs +++ b/test/WireMock.Net.Tests/WireMockServer.Admin.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.IO; using System.Linq; diff --git a/test/WireMock.Net.Tests/WireMockServer.AdminFiles.cs b/test/WireMock.Net.Tests/WireMockServer.AdminFiles.cs index 3fb66e2c4..479a40a4a 100644 --- a/test/WireMock.Net.Tests/WireMockServer.AdminFiles.cs +++ b/test/WireMock.Net.Tests/WireMockServer.AdminFiles.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Net; using System.Net.Http; diff --git a/test/WireMock.Net.Tests/WireMockServer.Authentication.cs b/test/WireMock.Net.Tests/WireMockServer.Authentication.cs index 9dc90007e..d3aa77c28 100644 --- a/test/WireMock.Net.Tests/WireMockServer.Authentication.cs +++ b/test/WireMock.Net.Tests/WireMockServer.Authentication.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using FluentAssertions; using NFluent; using WireMock.Matchers; diff --git a/test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs b/test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs index db56d5410..83fbf0c64 100644 --- a/test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs +++ b/test/WireMock.Net.Tests/WireMockServer.ImportWireMockOrg.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.IO; using System.Linq; using FluentAssertions; diff --git a/test/WireMock.Net.Tests/WireMockServer.Proxy.cs b/test/WireMock.Net.Tests/WireMockServer.Proxy.cs index 6bb753c40..f7a2c6ed0 100644 --- a/test/WireMock.Net.Tests/WireMockServer.Proxy.cs +++ b/test/WireMock.Net.Tests/WireMockServer.Proxy.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net; diff --git a/test/WireMock.Net.Tests/WireMockServer.Proxy2.cs b/test/WireMock.Net.Tests/WireMockServer.Proxy2.cs index bace30b65..9fa748ead 100644 --- a/test/WireMock.Net.Tests/WireMockServer.Proxy2.cs +++ b/test/WireMock.Net.Tests/WireMockServer.Proxy2.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using NFluent; using System; using System.Linq; diff --git a/test/WireMock.Net.Tests/WireMockServer.Settings.cs b/test/WireMock.Net.Tests/WireMockServer.Settings.cs index a698527b1..d1d5927e0 100644 --- a/test/WireMock.Net.Tests/WireMockServer.Settings.cs +++ b/test/WireMock.Net.Tests/WireMockServer.Settings.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Linq; using FluentAssertions; using Moq; diff --git a/test/WireMock.Net.Tests/WireMockServer.WebhookTests.cs b/test/WireMock.Net.Tests/WireMockServer.WebhookTests.cs index edc96c6b7..d082528c2 100644 --- a/test/WireMock.Net.Tests/WireMockServer.WebhookTests.cs +++ b/test/WireMock.Net.Tests/WireMockServer.WebhookTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.ClientCertificate.cs b/test/WireMock.Net.Tests/WireMockServerTests.ClientCertificate.cs index 68de2b27f..93ee9a844 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.ClientCertificate.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.ClientCertificate.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !NET451 && !NET452 using System.Net; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.WithBody.cs b/test/WireMock.Net.Tests/WireMockServerTests.WithBody.cs index cc90bef77..525e76880 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.WithBody.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.WithBody.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if !NET452 using System; using System.Collections.Generic; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.WithCallback.cs b/test/WireMock.Net.Tests/WireMockServerTests.WithCallback.cs index 10081e1c0..5b480942d 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.WithCallback.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.WithCallback.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System.Net; using System.Net.Http; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.WithMultiPart.cs b/test/WireMock.Net.Tests/WireMockServerTests.WithMultiPart.cs index fc11fd3d3..ef9c23ef7 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.WithMultiPart.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.WithMultiPart.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + #if MIMEKIT using System; using System.Net; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.WithParam.cs b/test/WireMock.Net.Tests/WireMockServerTests.WithParam.cs index 7cb809c8c..91f006e6d 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.WithParam.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.WithParam.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Net; using System.Threading.Tasks; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.WithProbability.cs b/test/WireMock.Net.Tests/WireMockServerTests.WithProbability.cs index e635a9cc9..458d71493 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.WithProbability.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.WithProbability.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Linq; using System.Net; diff --git a/test/WireMock.Net.Tests/WireMockServerTests.cs b/test/WireMock.Net.Tests/WireMockServerTests.cs index b0c33570f..4e85d0f11 100644 --- a/test/WireMock.Net.Tests/WireMockServerTests.cs +++ b/test/WireMock.Net.Tests/WireMockServerTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/test/WireMock.Net.Tests/WithMapping/WireMockServerWithMappingTests.cs b/test/WireMock.Net.Tests/WithMapping/WireMockServerWithMappingTests.cs index 948b6ed5d..b8622591d 100644 --- a/test/WireMock.Net.Tests/WithMapping/WireMockServerWithMappingTests.cs +++ b/test/WireMock.Net.Tests/WithMapping/WireMockServerWithMappingTests.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + using System; using FluentAssertions; using WireMock.Admin.Mappings; diff --git a/tools/MultipartUploader/Form1.Designer.cs b/tools/MultipartUploader/Form1.Designer.cs index 118fb985c..b076f6853 100644 --- a/tools/MultipartUploader/Form1.Designer.cs +++ b/tools/MultipartUploader/Form1.Designer.cs @@ -1,4 +1,6 @@ -namespace MultipartUploader +// Copyright © WireMock.Net + +namespace MultipartUploader { partial class Form1 { diff --git a/tools/MultipartUploader/Form1.cs b/tools/MultipartUploader/Form1.cs index 9e8e8821a..82c12f4f1 100644 --- a/tools/MultipartUploader/Form1.cs +++ b/tools/MultipartUploader/Form1.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace MultipartUploader { public partial class Form1 : Form diff --git a/tools/MultipartUploader/Program.cs b/tools/MultipartUploader/Program.cs index 590122433..be1d6a13e 100644 --- a/tools/MultipartUploader/Program.cs +++ b/tools/MultipartUploader/Program.cs @@ -1,3 +1,5 @@ +// Copyright © WireMock.Net + namespace MultipartUploader; internal static class Program