Use NuGet "Stef.Validation" (#707)

* Use NuGet "Stef.Validation"

* nuget

* .
This commit is contained in:
Stef Heyenrath
2021-12-30 10:44:50 +01:00
committed by GitHub
parent fd1f4968b4
commit e8e28c21a1
77 changed files with 267 additions and 421 deletions

View File

@@ -24,7 +24,7 @@ using WireMock.Serialization;
using WireMock.Settings;
using WireMock.Types;
using WireMock.Util;
using WireMock.Validation;
using Stef.Validation;
namespace WireMock.Server
{
@@ -206,7 +206,7 @@ namespace WireMock.Server
[PublicAPI]
public bool ReadStaticMappingAndAddOrUpdate([NotNull] string path)
{
Check.NotNull(path, nameof(path));
Guard.NotNull(path, nameof(path));
string filenameWithoutExtension = Path.GetFileNameWithoutExtension(path);
@@ -414,9 +414,9 @@ namespace WireMock.Server
private Guid? ConvertMappingAndRegisterAsRespondProvider(MappingModel mappingModel, Guid? guid = null, string path = null)
{
Check.NotNull(mappingModel, nameof(mappingModel));
Check.NotNull(mappingModel.Request, nameof(mappingModel.Request));
Check.NotNull(mappingModel.Response, nameof(mappingModel.Response));
Guard.NotNull(mappingModel, nameof(mappingModel));
Guard.NotNull(mappingModel.Request, nameof(mappingModel.Request));
Guard.NotNull(mappingModel.Response, nameof(mappingModel.Response));
var requestBuilder = InitRequestBuilder(mappingModel.Request, true);
if (requestBuilder == null)