mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-26 03:11:56 +01:00
cleanup + fix tests for net8
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if GRAPHQL
|
||||
//#if GRAPHQL
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
@@ -233,4 +233,4 @@ public class GraphQLMatcherTests
|
||||
action.Should().Throw<GraphQLSyntaxErrorException>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if PROTOBUF
|
||||
//#if PROTOBUF
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
@@ -108,4 +108,4 @@ message HelloReply {
|
||||
result.Exception.Should().BeOfType<ArgumentException>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if GRAPHQL
|
||||
//#if GRAPHQL
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
using GraphQL.Types;
|
||||
@@ -70,4 +70,4 @@ public class RequestBuilderWithGraphQLSchemaTests
|
||||
((RequestMessageGraphQLMatcher)matchers[0]).Matchers.Should().ContainItemsAssignableTo<GraphQLMatcher>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if PROTOBUF
|
||||
//#if PROTOBUF
|
||||
using System.Collections.Generic;
|
||||
using FluentAssertions;
|
||||
using WireMock.Matchers;
|
||||
@@ -64,4 +64,4 @@ message HelloReply {
|
||||
protoBufMatcher.Matcher.Should().BeOfType<JsonMatcher>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if GRAPHQL
|
||||
//#if GRAPHQL
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
@@ -193,4 +193,4 @@ public class RequestMessageGraphQLMatcherTests
|
||||
stringMatcherMock.Verify(m => m.IsMatch(It.IsAny<string>()), Times.Never);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright © WireMock.Net
|
||||
|
||||
#if !(NET452 || NET461 || NETCOREAPP3_1)
|
||||
//#if !(NET452 || NET461 || NETCOREAPP3_1)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
@@ -531,7 +531,7 @@ message HelloReply {
|
||||
return Verifier.Verify(model);
|
||||
}
|
||||
|
||||
#if GRAPHQL
|
||||
//#if GRAPHQL
|
||||
[Fact]
|
||||
public Task ToMappingModel_Request_WithBodyAsGraphQLSchema_ReturnsCorrectModel()
|
||||
{
|
||||
@@ -562,9 +562,9 @@ message HelloReply {
|
||||
// Verify
|
||||
return Verifier.Verify(model);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#if PROTOBUF
|
||||
//#if PROTOBUF
|
||||
[Fact]
|
||||
public Task ToMappingModel_Request_WithBodyAsProtoBuf_ReturnsCorrectModel()
|
||||
{
|
||||
@@ -651,6 +651,6 @@ message HelloReply {
|
||||
// Verify
|
||||
return Verifier.Verify(model);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
@@ -171,7 +171,7 @@ public class MatcherMapperTests
|
||||
model.XmlNamespaceMap.Should().BeEquivalentTo(xmlNamespaceMap);
|
||||
}
|
||||
|
||||
#if GRAPHQL
|
||||
//#if GRAPHQL
|
||||
[Fact]
|
||||
public void MatcherMapper_Map_Matcher_GraphQLMatcher()
|
||||
{
|
||||
@@ -199,9 +199,9 @@ public class MatcherMapperTests
|
||||
model.Pattern.Should().Be(testSchema);
|
||||
model.CustomScalars.Should().BeEquivalentTo(customScalars);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#if PROTOBUF
|
||||
//#if PROTOBUF
|
||||
[Fact]
|
||||
public void MatcherMapper_Map_Matcher_ProtoBufMatcher()
|
||||
{
|
||||
@@ -280,7 +280,7 @@ message HelloReply {
|
||||
model.ContentMatcher?.Name.Should().Be("JsonMatcher");
|
||||
model.ContentMatcher?.Pattern.Should().Be(jsonPattern);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
[Fact]
|
||||
public void MatcherMapper_Map_MatcherModel_Null()
|
||||
@@ -1050,7 +1050,7 @@ message HelloReply {
|
||||
}
|
||||
}
|
||||
|
||||
#if GRAPHQL
|
||||
//#if GRAPHQL
|
||||
[Fact]
|
||||
public void MatcherMapper_Map_MatcherModel_GraphQLMatcher()
|
||||
{
|
||||
@@ -1083,9 +1083,9 @@ message HelloReply {
|
||||
matcher.Name.Should().Be(nameof(GraphQLMatcher));
|
||||
matcher.CustomScalars.Should().BeEquivalentTo(customScalars);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#if PROTOBUF
|
||||
//#if PROTOBUF
|
||||
[Fact]
|
||||
public void MatcherMapper_Map_MatcherModel_ProtoBufMatcher()
|
||||
{
|
||||
@@ -1132,5 +1132,5 @@ message HelloReply {
|
||||
matcher.MessageType.Should().Be(messageType);
|
||||
matcher.Matcher?.Value.Should().Be(jsonMatcherPattern);
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
}
|
||||
Reference in New Issue
Block a user