diff --git a/WireMock.Net Solution.sln b/WireMock.Net Solution.sln index 84e542124..a10006023 100644 --- a/WireMock.Net Solution.sln +++ b/WireMock.Net Solution.sln @@ -36,18 +36,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp3", "examples\WireMock.Net.Console.NETCoreApp3\WireMock.Net.Console.NETCoreApp3.csproj", "{8C424EAF-8269-46A2-9FF1-F6D4EADB5CD5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Client", "examples\WireMock.Net.Client\WireMock.Net.Client.csproj", "{74D91AD0-D96D-4FD2-AEC5-CC49D38346C0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp", "examples\WireMock.Net.Console.NETCoreApp\WireMock.Net.Console.NETCoreApp.csproj", "{FE281639-B014-4C8A-96FA-141164A74713}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.Proxy.Net452", "examples\WireMock.Net.Console.Proxy.Net452\WireMock.Net.Console.Proxy.Net452.csproj", "{26433A8F-BF01-4962-97EB-81BFFBB61096}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Service", "examples\Wiremock.Net.Service\WireMock.Net.Service.csproj", "{7F0B2446-0363-4720-AF46-F47F83B557DC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.Net461.Classic", "examples\WireMock.Net.Console.Net461.Classic\WireMock.Net.Console.Net461.Classic.csproj", "{1261BB9B-A7D4-456C-8985-3CE560361B8E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.Net452.Classic", "examples\WireMock.Net.Console.Net452.Classic\WireMock.Net.Console.Net452.Classic.csproj", "{668F689E-57B4-422E-8846-C0FF643CA268}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.RequestLogTest", "examples\WireMock.Net.Console.RequestLogTest\WireMock.Net.Console.RequestLogTest.csproj", "{A9D039B9-7509-4CF1-9EFD-87EB82998575}" @@ -58,18 +52,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.OpenApiParser. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.FluentAssertions", "src\WireMock.Net.FluentAssertions\WireMock.Net.FluentAssertions.csproj", "{B6269AAC-170A-4346-8B9A-579DED3D9A95}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.WebApplication.NETCore3", "examples\WireMock.Net.WebApplication.NETCore3\WireMock.Net.WebApplication.NETCore3.csproj", "{E1C56967-3DC7-46CB-A1DF-B13167A0D9D4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp3WithCertificate", "examples\WireMock.Net.Console.NETCoreApp3WithCertificate\WireMock.Net.Console.NETCoreApp3WithCertificate.csproj", "{925E421A-1B3F-4202-B48F-734743573A4B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-WireMock", "src\dotnet-WireMock.Net\dotnet-WireMock.csproj", "{40BF24B5-12E6-4610-9489-138798632E28}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET5", "examples\WireMock.Net.Console.NET5\WireMock.Net.Console.NET5.csproj", "{3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Matchers.CSharpCode", "src\WireMock.Net.Matchers.CSharpCode\WireMock.Net.Matchers.CSharpCode.csproj", "{B6269AAC-170A-4346-8B9A-444DED3D9A44}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.Net472.Classic", "examples\WireMock.Net.Console.Net472.Classic\WireMock.Net.Console.Net472.Classic.csproj", "{6580580B-1EFD-4922-B0EC-FF290DB279EE}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Actions", "Actions", "{1DAEFF47-D117-4E95-8B3E-4F7C8B92011A}" ProjectSection(SolutionItems) = preProject .github\workflows\ci.yml = .github\workflows\ci.yml @@ -88,8 +74,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Org.RestClient", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Org.Abstractions", "src\WireMock.Org.Abstractions\WireMock.Org.Abstractions.csproj", "{3BA5109E-5F30-4CC2-B699-02EC82560AA6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET6", "examples\WireMock.Net.Console.NET6\WireMock.Net.Console.NET6.csproj", "{2215055B-594E-4C2F-99B2-6DF337F02893}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.WebApplication.NET6", "examples\WireMock.Net.WebApplication.NET6\WireMock.Net.WebApplication.NET6.csproj", "{3F7AA023-6833-4856-A08A-4B5717B592B8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.Proxy.NETCoreApp", "examples\WireMock.Net.Console.Proxy.NETCoreApp\WireMock.Net.Console.Proxy.NETCoreApp.csproj", "{670C7562-C154-442E-A249-7D26849BCD13}" @@ -108,8 +92,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{0147029F EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultipartUploader", "tools\MultipartUploader\MultipartUploader.csproj", "{07C30227-ADEC-4BDE-8CDC-849D85A690BB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET7.UsingNuGet", "examples\WireMock.Net.Console.NET7.UsingNuGet\WireMock.Net.Console.NET7.UsingNuGet.csproj", "{941229D6-191B-4B5E-AC81-0905EBF4F19D}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NET8", "examples\WireMock.Net.Console.NET8\WireMock.Net.Console.NET8.csproj", "{1EA72C0F-92E9-486B-8FFE-53F992BFC4AA}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMockAzureQueueProxy", "examples\WireMockAzureQueueProxy\WireMockAzureQueueProxy.csproj", "{7FC0B409-2682-40EE-B3B9-3930D6769D01}" @@ -172,18 +154,10 @@ Global {31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|Any CPU.Build.0 = Debug|Any CPU {31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Release|Any CPU.ActiveCfg = Release|Any CPU {31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Release|Any CPU.Build.0 = Release|Any CPU - {8C424EAF-8269-46A2-9FF1-F6D4EADB5CD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C424EAF-8269-46A2-9FF1-F6D4EADB5CD5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C424EAF-8269-46A2-9FF1-F6D4EADB5CD5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C424EAF-8269-46A2-9FF1-F6D4EADB5CD5}.Release|Any CPU.Build.0 = Release|Any CPU {74D91AD0-D96D-4FD2-AEC5-CC49D38346C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74D91AD0-D96D-4FD2-AEC5-CC49D38346C0}.Debug|Any CPU.Build.0 = Debug|Any CPU {74D91AD0-D96D-4FD2-AEC5-CC49D38346C0}.Release|Any CPU.ActiveCfg = Release|Any CPU {74D91AD0-D96D-4FD2-AEC5-CC49D38346C0}.Release|Any CPU.Build.0 = Release|Any CPU - {FE281639-B014-4C8A-96FA-141164A74713}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE281639-B014-4C8A-96FA-141164A74713}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.Build.0 = Release|Any CPU {26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug|Any CPU.Build.0 = Debug|Any CPU {26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -192,10 +166,6 @@ Global {7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {7F0B2446-0363-4720-AF46-F47F83B557DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {7F0B2446-0363-4720-AF46-F47F83B557DC}.Release|Any CPU.Build.0 = Release|Any CPU - {1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1261BB9B-A7D4-456C-8985-3CE560361B8E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1261BB9B-A7D4-456C-8985-3CE560361B8E}.Release|Any CPU.Build.0 = Release|Any CPU {668F689E-57B4-422E-8846-C0FF643CA268}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {668F689E-57B4-422E-8846-C0FF643CA268}.Debug|Any CPU.Build.0 = Debug|Any CPU {668F689E-57B4-422E-8846-C0FF643CA268}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -216,30 +186,14 @@ Global {B6269AAC-170A-4346-8B9A-579DED3D9A95}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6269AAC-170A-4346-8B9A-579DED3D9A95}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6269AAC-170A-4346-8B9A-579DED3D9A95}.Release|Any CPU.Build.0 = Release|Any CPU - {E1C56967-3DC7-46CB-A1DF-B13167A0D9D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1C56967-3DC7-46CB-A1DF-B13167A0D9D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1C56967-3DC7-46CB-A1DF-B13167A0D9D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E1C56967-3DC7-46CB-A1DF-B13167A0D9D4}.Release|Any CPU.Build.0 = Release|Any CPU - {925E421A-1B3F-4202-B48F-734743573A4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {925E421A-1B3F-4202-B48F-734743573A4B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {925E421A-1B3F-4202-B48F-734743573A4B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {925E421A-1B3F-4202-B48F-734743573A4B}.Release|Any CPU.Build.0 = Release|Any CPU {40BF24B5-12E6-4610-9489-138798632E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {40BF24B5-12E6-4610-9489-138798632E28}.Debug|Any CPU.Build.0 = Debug|Any CPU {40BF24B5-12E6-4610-9489-138798632E28}.Release|Any CPU.ActiveCfg = Release|Any CPU {40BF24B5-12E6-4610-9489-138798632E28}.Release|Any CPU.Build.0 = Release|Any CPU - {3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8}.Release|Any CPU.Build.0 = Release|Any CPU {B6269AAC-170A-4346-8B9A-444DED3D9A44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B6269AAC-170A-4346-8B9A-444DED3D9A44}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6269AAC-170A-4346-8B9A-444DED3D9A44}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6269AAC-170A-4346-8B9A-444DED3D9A44}.Release|Any CPU.Build.0 = Release|Any CPU - {6580580B-1EFD-4922-B0EC-FF290DB279EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6580580B-1EFD-4922-B0EC-FF290DB279EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6580580B-1EFD-4922-B0EC-FF290DB279EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6580580B-1EFD-4922-B0EC-FF290DB279EE}.Release|Any CPU.Build.0 = Release|Any CPU {08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F}.Debug|Any CPU.Build.0 = Debug|Any CPU {08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -248,10 +202,6 @@ Global {3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Debug|Any CPU.Build.0 = Debug|Any CPU {3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Release|Any CPU.ActiveCfg = Release|Any CPU {3BA5109E-5F30-4CC2-B699-02EC82560AA6}.Release|Any CPU.Build.0 = Release|Any CPU - {2215055B-594E-4C2F-99B2-6DF337F02893}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2215055B-594E-4C2F-99B2-6DF337F02893}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2215055B-594E-4C2F-99B2-6DF337F02893}.Release|Any CPU.Build.0 = Release|Any CPU {3F7AA023-6833-4856-A08A-4B5717B592B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3F7AA023-6833-4856-A08A-4B5717B592B8}.Debug|Any CPU.Build.0 = Debug|Any CPU {3F7AA023-6833-4856-A08A-4B5717B592B8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -284,10 +234,6 @@ Global {07C30227-ADEC-4BDE-8CDC-849D85A690BB}.Debug|Any CPU.Build.0 = Debug|Any CPU {07C30227-ADEC-4BDE-8CDC-849D85A690BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {07C30227-ADEC-4BDE-8CDC-849D85A690BB}.Release|Any CPU.Build.0 = Release|Any CPU - {941229D6-191B-4B5E-AC81-0905EBF4F19D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {941229D6-191B-4B5E-AC81-0905EBF4F19D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {941229D6-191B-4B5E-AC81-0905EBF4F19D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {941229D6-191B-4B5E-AC81-0905EBF4F19D}.Release|Any CPU.Build.0 = Release|Any CPU {1EA72C0F-92E9-486B-8FFE-53F992BFC4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1EA72C0F-92E9-486B-8FFE-53F992BFC4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EA72C0F-92E9-486B-8FFE-53F992BFC4AA}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -366,28 +312,20 @@ Global {B6269AAC-170A-43D6-8B9A-579DED3D9A96} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} {B6269AAC-170A-43D5-8B9A-579DED3D9A95} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} {31DC2EF8-C3FE-467D-84BE-FB5D956E612E} = {0BB8B634-407A-4610-A91F-11586990767A} - {8C424EAF-8269-46A2-9FF1-F6D4EADB5CD5} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {74D91AD0-D96D-4FD2-AEC5-CC49D38346C0} = {985E0ADB-D4B4-473A-AA40-567E279B7946} - {FE281639-B014-4C8A-96FA-141164A74713} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {26433A8F-BF01-4962-97EB-81BFFBB61096} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {7F0B2446-0363-4720-AF46-F47F83B557DC} = {985E0ADB-D4B4-473A-AA40-567E279B7946} - {1261BB9B-A7D4-456C-8985-3CE560361B8E} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {668F689E-57B4-422E-8846-C0FF643CA268} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {A9D039B9-7509-4CF1-9EFD-87EB82998575} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {D3804228-91F4-4502-9595-39584E5AADAD} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} {5C09FB93-1535-4F92-AF26-21E8A061EE4A} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {B6269AAC-170A-4346-8B9A-579DED3D9A95} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} - {E1C56967-3DC7-46CB-A1DF-B13167A0D9D4} = {985E0ADB-D4B4-473A-AA40-567E279B7946} - {925E421A-1B3F-4202-B48F-734743573A4B} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {40BF24B5-12E6-4610-9489-138798632E28} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} - {3F8CF0AE-5F24-4A54-89E7-A3EE829DB5F8} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {B6269AAC-170A-4346-8B9A-444DED3D9A44} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} - {6580580B-1EFD-4922-B0EC-FF290DB279EE} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {1DAEFF47-D117-4E95-8B3E-4F7C8B92011A} = {7EFB2C5B-1BB2-4AAF-BC9F-216ED80C594D} {5B64F6CA-BF6B-4F67-BB2A-9C47E441703E} = {7EFB2C5B-1BB2-4AAF-BC9F-216ED80C594D} {08B29DB1-FEFE-408A-AD0A-6BA6DDC8D70F} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} {3BA5109E-5F30-4CC2-B699-02EC82560AA6} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} - {2215055B-594E-4C2F-99B2-6DF337F02893} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {3F7AA023-6833-4856-A08A-4B5717B592B8} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {670C7562-C154-442E-A249-7D26849BCD13} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {0DE0954F-8C00-4E8D-B94A-4361FC1CBE44} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} @@ -396,7 +334,6 @@ Global {12B016A5-9D8B-4EFE-96C2-CA51BE43367D} = {8F890C6F-9ACC-438D-928A-AD61CDA862F2} {56A38798-C48B-4A4A-B805-071E05C02CE1} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {07C30227-ADEC-4BDE-8CDC-849D85A690BB} = {0147029F-FA4A-44B3-B79A-3C3574054EE4} - {941229D6-191B-4B5E-AC81-0905EBF4F19D} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {1EA72C0F-92E9-486B-8FFE-53F992BFC4AA} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {7FC0B409-2682-40EE-B3B9-3930D6769D01} = {985E0ADB-D4B4-473A-AA40-567E279B7946} {B1580A38-84E7-44BE-8FE7-3EE5031D74A1} = {985E0ADB-D4B4-473A-AA40-567E279B7946} diff --git a/examples/WireMock.Net.Client.Net472/App.config b/examples/WireMock.Net.Client.Net472/App.config deleted file mode 100644 index 56efbc7b5..000000000 --- a/examples/WireMock.Net.Client.Net472/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Client.Net472/Program.cs b/examples/WireMock.Net.Client.Net472/Program.cs deleted file mode 100644 index da6a6d43e..000000000 --- a/examples/WireMock.Net.Client.Net472/Program.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © WireMock.Net - -using Newtonsoft.Json; -using RestEase; -using System; -using System.Net.Http.Headers; -using System.Text; -using System.Threading.Tasks; -using WireMock.Client; - -namespace WireMock.Net.Client.Net472 -{ - class Program - { - static async Task Main(string[] args) - { - // Create an implementation of the IWireMockAdminApi and pass in the base URL for the API. - var api = RestClient.For("http://localhost:9091"); - - // Set BASIC Auth - var value = Convert.ToBase64String(Encoding.ASCII.GetBytes("a:b")); - api.Authorization = new AuthenticationHeaderValue("Basic", value); - - var settings1 = await api.GetSettingsAsync(); - Console.WriteLine($"settings1 = {JsonConvert.SerializeObject(settings1)}"); - } - } - - //public interface IWireMockAdminApi - //{ - // /// - // /// Authentication header - // /// - // [Header("Authorization")] - // AuthenticationHeaderValue Authorization { get; set; } - //} -} \ No newline at end of file diff --git a/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs b/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs deleted file mode 100644 index fc30bafdb..000000000 --- a/examples/WireMock.Net.Client.Net472/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © WireMock.Net - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WireMock.Net.Client.Net472")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("mStack.nl")] -[assembly: AssemblyProduct("WireMock.Net.Client.Net472")] -[assembly: AssemblyCopyright("Copyright © mStack.nl 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("02082e34-def2-47d0-af0b-3326faa908ce")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/examples/WireMock.Net.Client.Net472/WireMock.Net.Client.Net472.csproj b/examples/WireMock.Net.Client.Net472/WireMock.Net.Client.Net472.csproj deleted file mode 100644 index 027ed4dac..000000000 --- a/examples/WireMock.Net.Client.Net472/WireMock.Net.Client.Net472.csproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Debug - AnyCPU - {02082E34-DEF2-47D0-AF0B-3326FAA908CE} - Exe - WireMock.Net.Client.Net472 - WireMock.Net.Client.Net472 - v4.7.2 - 512 - true - true - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - false - - - - - - - - ..\..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\RestEase.1.4.10\lib\net45\RestEase.dll - - - - - - - - - - - - ..\..\packages\WireMock.Net.Abstractions.1.2.0\lib\net45\WireMock.Net.Abstractions.dll - - - ..\..\packages\WireMock.Net.RestClient.1.2.0\lib\net45\WireMock.Net.RestClient.dll - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Client.Net472/packages.config b/examples/WireMock.Net.Client.Net472/packages.config deleted file mode 100644 index 4480ed2be..000000000 --- a/examples/WireMock.Net.Client.Net472/packages.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/WireMock.Net.Console.NET5.csproj b/examples/WireMock.Net.Console.NET5/WireMock.Net.Console.NET5.csproj deleted file mode 100644 index bf5ea660b..000000000 --- a/examples/WireMock.Net.Console.NET5/WireMock.Net.Console.NET5.csproj +++ /dev/null @@ -1,54 +0,0 @@ - - - - Exe - net5.0 - - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Never - - - PreserveNewest - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/1.cs b/examples/WireMock.Net.Console.NET5/__admin/mappings/1.cs deleted file mode 100644 index 470713ac7..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/1.cs +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright © WireMock.Net - -// C# Hello \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json b/examples/WireMock.Net.Console.NET5/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json deleted file mode 100644 index ec54f7a64..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/static/mapping", - } - ] - }, - "Methods": [ - "get", - "post" - ] - }, - "Response": { - "BodyAsJson": { "body": "static mapping" }, - "Headers": { - "Content-Type": "application/json", - "Test-X": [ "test 1", "test 2" ] - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json b/examples/WireMock.Net.Console.NET5/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json deleted file mode 100644 index d7a6cbdd7..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Guid": "791a3f31-6946-4ce7-8e6f-0237c7443275", - "Title": "", - "Priority": 0, - "Request": { - "Path": "/proxy-google-test-post", - "Methods": [ - "post" - ], - "Body": {} - }, - "Response": { - "StatusCode": 404, - "Body": "\n\n \n \n Error 404 (Not Found)!!1\n \n \n

404. That’s an error.\n

The requested URL /proxy-google-test-post was not found on this server. That’s all we know.\n", - "BodyAsBytes": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CiAgPG1ldGEgY2hhcnNldD11dGYtOD4KICA8bWV0YSBuYW1lPXZpZXdwb3J0IGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MSwgbWluaW11bS1zY2FsZT0xLCB3aWR0aD1kZXZpY2Utd2lkdGgiPgogIDx0aXRsZT5FcnJvciA0MDQgKE5vdCBGb3VuZCkhITE8L3RpdGxlPgogIDxzdHlsZT4KICAgICp7bWFyZ2luOjA7cGFkZGluZzowfWh0bWwsY29kZXtmb250OjE1cHgvMjJweCBhcmlhbCxzYW5zLXNlcmlmfWh0bWx7YmFja2dyb3VuZDojZmZmO2NvbG9yOiMyMjI7cGFkZGluZzoxNXB4fWJvZHl7bWFyZ2luOjclIGF1dG8gMDttYXgtd2lkdGg6MzkwcHg7bWluLWhlaWdodDoxODBweDtwYWRkaW5nOjMwcHggMCAxNXB4fSogPiBib2R5e2JhY2tncm91bmQ6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2Vycm9ycy9yb2JvdC5wbmcpIDEwMCUgNXB4IG5vLXJlcGVhdDtwYWRkaW5nLXJpZ2h0OjIwNXB4fXB7bWFyZ2luOjExcHggMCAyMnB4O292ZXJmbG93OmhpZGRlbn1pbnN7Y29sb3I6Izc3Nzt0ZXh0LWRlY29yYXRpb246bm9uZX1hIGltZ3tib3JkZXI6MH1AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOjc3MnB4KXtib2R5e2JhY2tncm91bmQ6bm9uZTttYXJnaW4tdG9wOjA7bWF4LXdpZHRoOm5vbmU7cGFkZGluZy1yaWdodDowfX0jbG9nb3tiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9icmFuZGluZy9nb29nbGVsb2dvLzF4L2dvb2dsZWxvZ29fY29sb3JfMTUweDU0ZHAucG5nK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TigJlzIGFsbCB3ZSBrbm93LjwvaW5zPgo=", - "BodyEncoding": { - "CodePage": 65001, - "EncodingName": "Unicode (UTF-8)", - "WebName": "utf-8" - }, - "UseTransformer": false, - "Headers": { - "Date": "Wed, 27 Oct 2017 18:57:40 GMT", - "Alt-Svc": "quic=\":443\"; ma=2592000; v=\"39,38,37,35\"", - "Referrer-Policy": "no-referrer", - "Connection": "close" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json b/examples/WireMock.Net.Console.NET5/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json deleted file mode 100644 index dd5018000..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "Guid": "873d495f-940e-4b86-a1f4-4f0fc7be8b8b", - "Priority": 4, - "Request": { - "Path": {}, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "BodyDestination": "SameAsSource", - "Body": "NO PATH OR URL", - "UseTransformer": false, - "Headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/BodyAsFileExample.json b/examples/WireMock.Net.Console.NET5/__admin/mappings/BodyAsFileExample.json deleted file mode 100644 index 7ec87a334..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/BodyAsFileExample.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Guid": "1234567A-940e-4b86-a1f4-4f0fc7be8b8b", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/bodyasfilexmltest", - "IgnoreCase": false - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "Headers": { "Content-Type": "application/xml" }, - "BodyAsFile": "MyXmlResponse.xml", - "BodyAsFileIsCached": false, - "UseTransformer": false - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/BodyAsFileExample2.json b/examples/WireMock.Net.Console.NET5/__admin/mappings/BodyAsFileExample2.json deleted file mode 100644 index 25ec48328..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/BodyAsFileExample2.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Guid": "1234567B-940e-4b86-a1f4-4f0fc7be8b8b", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/bodyasfilexmltest2", - "IgnoreCase": false - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "Headers": { "Content-Type": "application/xml" }, - "BodyAsFile": "MyXmlResponse.xml", - "BodyAsFileIsCached": true, - "UseTransformer": false - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/MyXmlResponse.xml b/examples/WireMock.Net.Console.NET5/__admin/mappings/MyXmlResponse.xml deleted file mode 100644 index 24fd28d33..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/MyXmlResponse.xml +++ /dev/null @@ -1,3 +0,0 @@ - -world - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/__admin/mappings/array.json b/examples/WireMock.Net.Console.NET5/__admin/mappings/array.json deleted file mode 100644 index 79f338ae7..000000000 --- a/examples/WireMock.Net.Console.NET5/__admin/mappings/array.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "Title": "1", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_1" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_1" }, - "Headers": { - "Content-Type": "application/json" - } - } - }, - { - "Title": "2", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_2" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_2" }, - "Headers": { - "Content-Type": "application/json" - } - } - } -] \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET5/log4net.config b/examples/WireMock.Net.Console.NET5/log4net.config deleted file mode 100644 index feae99529..000000000 --- a/examples/WireMock.Net.Console.NET5/log4net.config +++ /dev/null @@ -1,20 +0,0 @@ - - - -

- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/WireMock.Net.Console.NET6.csproj b/examples/WireMock.Net.Console.NET6/WireMock.Net.Console.NET6.csproj deleted file mode 100644 index c6a5a69c5..000000000 --- a/examples/WireMock.Net.Console.NET6/WireMock.Net.Console.NET6.csproj +++ /dev/null @@ -1,40 +0,0 @@ - - - - Exe - net6.0 - $(DefineConstants);GRAPHQL;MIMEKIT - - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/1.cs b/examples/WireMock.Net.Console.NET6/__admin/mappings/1.cs deleted file mode 100644 index 470713ac7..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/1.cs +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright © WireMock.Net - -// C# Hello \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json b/examples/WireMock.Net.Console.NET6/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json deleted file mode 100644 index ec54f7a64..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/static/mapping", - } - ] - }, - "Methods": [ - "get", - "post" - ] - }, - "Response": { - "BodyAsJson": { "body": "static mapping" }, - "Headers": { - "Content-Type": "application/json", - "Test-X": [ "test 1", "test 2" ] - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json b/examples/WireMock.Net.Console.NET6/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json deleted file mode 100644 index d7a6cbdd7..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Guid": "791a3f31-6946-4ce7-8e6f-0237c7443275", - "Title": "", - "Priority": 0, - "Request": { - "Path": "/proxy-google-test-post", - "Methods": [ - "post" - ], - "Body": {} - }, - "Response": { - "StatusCode": 404, - "Body": "\n\n \n \n Error 404 (Not Found)!!1\n \n \n

404. That’s an error.\n

The requested URL /proxy-google-test-post was not found on this server. That’s all we know.\n", - "BodyAsBytes": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CiAgPG1ldGEgY2hhcnNldD11dGYtOD4KICA8bWV0YSBuYW1lPXZpZXdwb3J0IGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MSwgbWluaW11bS1zY2FsZT0xLCB3aWR0aD1kZXZpY2Utd2lkdGgiPgogIDx0aXRsZT5FcnJvciA0MDQgKE5vdCBGb3VuZCkhITE8L3RpdGxlPgogIDxzdHlsZT4KICAgICp7bWFyZ2luOjA7cGFkZGluZzowfWh0bWwsY29kZXtmb250OjE1cHgvMjJweCBhcmlhbCxzYW5zLXNlcmlmfWh0bWx7YmFja2dyb3VuZDojZmZmO2NvbG9yOiMyMjI7cGFkZGluZzoxNXB4fWJvZHl7bWFyZ2luOjclIGF1dG8gMDttYXgtd2lkdGg6MzkwcHg7bWluLWhlaWdodDoxODBweDtwYWRkaW5nOjMwcHggMCAxNXB4fSogPiBib2R5e2JhY2tncm91bmQ6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2Vycm9ycy9yb2JvdC5wbmcpIDEwMCUgNXB4IG5vLXJlcGVhdDtwYWRkaW5nLXJpZ2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xMDAlfX0jbG9nb3tkaXNwbGF5OmlubGluZS1ibG9jaztoZWlnaHQ6NTRweDt3aWR0aDoxNTBweH0KICA8L3N0eWxlPgogIDxhIGhyZWY9Ly93d3cuZ29vZ2xlLmNvbS8+PHNwYW4gaWQ9bG9nbyBhcmlhLWxhYmVsPUdvb2dsZT48L3NwYW4+PC9hPgogIDxwPjxiPjQwNC48L2I+IDxpbnM+VGhhdOKAmXMgYW4gZXJyb3IuPC9pbnM+CiAgPHA+VGhlIHJlcXVlc3RlZCBVUkwgPGNvZGU+L3Byb3h5LWdvb2dsZS10ZXN0LXBvc3Q8L2NvZGU+IHdhcyBub3QgZm91bmQgb24gdGhpcyBzZXJ2ZXIuICA8aW5zPlRoYXTigJlzIGFsbCB3ZSBrbm93LjwvaW5zPgo=", - "BodyEncoding": { - "CodePage": 65001, - "EncodingName": "Unicode (UTF-8)", - "WebName": "utf-8" - }, - "UseTransformer": false, - "Headers": { - "Date": "Wed, 27 Oct 2017 18:57:40 GMT", - "Alt-Svc": "quic=\":443\"; ma=2592000; v=\"39,38,37,35\"", - "Referrer-Policy": "no-referrer", - "Connection": "close" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json b/examples/WireMock.Net.Console.NET6/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json deleted file mode 100644 index dd5018000..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "Guid": "873d495f-940e-4b86-a1f4-4f0fc7be8b8b", - "Priority": 4, - "Request": { - "Path": {}, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "BodyDestination": "SameAsSource", - "Body": "NO PATH OR URL", - "UseTransformer": false, - "Headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/BodyAsFileExample.json b/examples/WireMock.Net.Console.NET6/__admin/mappings/BodyAsFileExample.json deleted file mode 100644 index 222f988b6..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/BodyAsFileExample.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "Guid": "1234567A-940e-4b86-a1f4-4f0fc7be8b8b", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/bodyasfilexmltest", - "IgnoreCase": false - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "Headers": { "Content-Type": "application/xml" }, - "BodyAsFile": "MyXmlResponse.xml", - "UseTransformer": false - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/MyXmlResponse.xml b/examples/WireMock.Net.Console.NET6/__admin/mappings/MyXmlResponse.xml deleted file mode 100644 index 24fd28d33..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/MyXmlResponse.xml +++ /dev/null @@ -1,3 +0,0 @@ - -world - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/array.json b/examples/WireMock.Net.Console.NET6/__admin/mappings/array.json deleted file mode 100644 index 79f338ae7..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/array.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "Title": "1", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_1" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_1" }, - "Headers": { - "Content-Type": "application/json" - } - } - }, - { - "Title": "2", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_2" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_2" }, - "Headers": { - "Content-Type": "application/json" - } - } - } -] \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/__admin/mappings/issue-1001.json b/examples/WireMock.Net.Console.NET6/__admin/mappings/issue-1001.json deleted file mode 100644 index 99242bd5e..000000000 --- a/examples/WireMock.Net.Console.NET6/__admin/mappings/issue-1001.json +++ /dev/null @@ -1,48 +0,0 @@ -[ - { - "Guid": "12343f31-6946-4ce7-8e6f-0237c7001000", - "Title": "1", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_1" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_1" }, - "Headers": { - "Content-Type": "application/json" - } - } - }, - { - "Guid": "12343f31-6946-4ce7-8e6f-0237c7002000", - "Title": "2", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_2" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_2" }, - "Headers": { - "Content-Type": "application/json" - } - } - } -] \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET6/log4net.config b/examples/WireMock.Net.Console.NET6/log4net.config deleted file mode 100644 index feae99529..000000000 --- a/examples/WireMock.Net.Console.NET6/log4net.config +++ /dev/null @@ -1,20 +0,0 @@ - - - -

- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs b/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs deleted file mode 100644 index 4707f295c..000000000 --- a/examples/WireMock.Net.Console.NET7.UsingNuGet/Program.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright © WireMock.Net - -using System.Net; -using System.Net.Http.Headers; -using System.Text; -using FluentAssertions; -using MimeKit; -using WireMock.Logging; -using WireMock.RequestBuilders; -using WireMock.ResponseBuilders; -using WireMock.Server; -using WireMock.Settings; - -namespace WireMock.Net.Console.NET7.UsingNuGet; - -internal class Program -{ - private static async Task Main(string[] args) - { - var server = WireMockServer.Start(new WireMockServerSettings - { - Logger = new WireMockConsoleLogger(), - }); - - server - .Given(Request.Create() - .UsingPost() - .WithPath("/test") - ) - .RespondWith(Response.Create() - .WithBody(requestMessage => requestMessage.BodyAsMimeMessage != null ? - "BodyAsMimeMessage is present" : - "BodyAsMimeMessage is not present") - ); - - server - .Given(Request.Create() - .UsingPost() - .WithPath("/some/endpoint") - ) - .RespondWith(Response.Create() - .WithStatusCode(HttpStatusCode.Created) - ); - - var httpClient = server.CreateClient(); - var content = new StringContent("abc", Encoding.UTF8, "application/json"); - - await TestAsync(httpClient, content); - - await TestNoMultiPartAsync(httpClient, content); - - await TestMultiPartAsync(server); - } - - private static async Task TestNoMultiPartAsync(HttpClient httpClient, StringContent content) - { - var response = await httpClient.PostAsync("/test", content); - - response.StatusCode.Should().Be(HttpStatusCode.OK); - (await response.Content.ReadAsStringAsync()).Should().Be("BodyAsMimeMessage is not present"); - } - - private static async Task TestAsync(HttpClient httpClient, StringContent content) - { - var response = await httpClient.PostAsync("some/endpoint", content); - - response.StatusCode.Should().Be(HttpStatusCode.Created); - (await response.Content.ReadAsStringAsync()).Should().BeEmpty(); - } - - private static async Task TestMultiPartAsync(WireMockServer server) - { - var textPlainContent = "This is some plain text"; - var textPlainContentType = "text/plain"; - - var textJson = "{ \"Key\" : \"Value\" }"; - var textJsonContentType = "text/json"; - - var imagePngBytes = Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAgMAAAAP2OW3AAAADFBMVEX/tID/vpH/pWX/sHidUyjlAAAADElEQVR4XmMQYNgAAADkAMHebX3mAAAAAElFTkSuQmCC"); - - server - .Given( - Request.Create() - .UsingPost() - .WithPath("/multipart") - ) - .RespondWith(Response.Create() - .WithBody(requestMessage => requestMessage.BodyAsMimeMessage is MimeMessage mm ? - "BodyAsMimeMessage is present: " + ((MimePart)mm.BodyParts.Last()).FileName : - "BodyAsMimeMessage is not present") - ); - - // Act - var formDataContent = new MultipartFormDataContent - { - { new StringContent(textPlainContent, Encoding.UTF8, textPlainContentType), "text" }, - { new StringContent(textJson, Encoding.UTF8, textJsonContentType), "json" } - }; - - var fileContent = new ByteArrayContent(imagePngBytes); - fileContent.Headers.ContentType = new MediaTypeHeaderValue("image/png"); - formDataContent.Add(fileContent, "somefile", "image.png"); - - var client = server.CreateClient(); - - var response = await client.PostAsync("/multipart", formDataContent); - - response.StatusCode.Should().Be(HttpStatusCode.OK); - (await response.Content.ReadAsStringAsync()).Should().Be("BodyAsMimeMessage is present: image.png"); - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NET7.UsingNuGet/WireMock.Net.Console.NET7.UsingNuGet.csproj b/examples/WireMock.Net.Console.NET7.UsingNuGet/WireMock.Net.Console.NET7.UsingNuGet.csproj deleted file mode 100644 index 3bd920bc5..000000000 --- a/examples/WireMock.Net.Console.NET7.UsingNuGet/WireMock.Net.Console.NET7.UsingNuGet.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - - - - - - diff --git a/examples/WireMock.Net.Console.NETCoreApp/Program.cs b/examples/WireMock.Net.Console.NET8/Program.cs similarity index 92% rename from examples/WireMock.Net.Console.NETCoreApp/Program.cs rename to examples/WireMock.Net.Console.NET8/Program.cs index b86370aa2..2a8ae4c44 100644 --- a/examples/WireMock.Net.Console.NETCoreApp/Program.cs +++ b/examples/WireMock.Net.Console.NET8/Program.cs @@ -7,7 +7,7 @@ using log4net.Repository; using WireMock.Net.ConsoleApplication; -namespace WireMock.Net.Console.NETCoreApp; +namespace WireMock.Net.Console.NET8; static class Program { diff --git a/examples/WireMock.Net.Console.NET8/WireMock.Net.Console.NET8.csproj b/examples/WireMock.Net.Console.NET8/WireMock.Net.Console.NET8.csproj index ff5b2a2fa..9e9be360c 100644 --- a/examples/WireMock.Net.Console.NET8/WireMock.Net.Console.NET8.csproj +++ b/examples/WireMock.Net.Console.NET8/WireMock.Net.Console.NET8.csproj @@ -9,7 +9,6 @@ - diff --git a/examples/WireMock.Net.Console.NETCoreApp/WireMock.Net.Console.NETCoreApp.csproj b/examples/WireMock.Net.Console.NETCoreApp/WireMock.Net.Console.NETCoreApp.csproj deleted file mode 100644 index fdba0459d..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp/WireMock.Net.Console.NETCoreApp.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - Exe - netcoreapp1.1 - ../../resources/WireMock.Net-Logo.ico - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Never - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json b/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json deleted file mode 100644 index 9c761369d..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/static/mapping" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "body": "static mapping" }, - "Headers": { - "Content-Type": "application/json", - "Test-X": [ "test 1", "test 2" ] - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json b/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json deleted file mode 100644 index d7a6cbdd7..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Guid": "791a3f31-6946-4ce7-8e6f-0237c7443275", - "Title": "", - "Priority": 0, - "Request": { - "Path": "/proxy-google-test-post", - "Methods": [ - "post" - ], - "Body": {} - }, - "Response": { - "StatusCode": 404, - "Body": "\n\n \n \n Error 404 (Not Found)!!1\n \n \n

404. That’s an error.\n

The requested URL /proxy-google-test-post was not found on this server. That’s all we know.\n", - "BodyAsBytes": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CiAgPG1ldGEgY2hhcnNldD11dGYtOD4KICA8bWV0YSBuYW1lPXZpZXdwb3J0IGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MSwgbWluaW11bS1zY2FsZT0xLCB3aWR0aD1kZXZpY2Utd2lkdGgiPgogIDx0aXRsZT5FcnJvciA0MDQgKE5vdCBGb3VuZCkhITE8L3RpdGxlPgogIDxzdHlsZT4KICAgICp7bWFyZ2luOjA7cGFkZGluZzowfWh0bWwsY29kZXtmb250OjE1cHgvMjJweCBhcmlhbCxzYW5zLXNlcmlmfWh0bWx7YmFja2dyb3VuZDojZmZmO2NvbG9yOiMyMjI7cGFkZGluZzoxNXB4fWJvZHl7bWFyZ2luOjclIGF1dG8gMDttYXgtd2lkdGg6MzkwcHg7bWluLWhlaWdodDoxODBweDtwYWRkaW5nOjMwcHggMCAxNXB4fSogPiBib2R5e2JhY2tncm91bmQ6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2Vycm9ycy9yb2JvdC5wbmcpIDEwMCUgNXB4IG5vLXJlcGVhdDtwYWRkaW5nLXJpZ2h0OjIwNXB4fXB7bWFyZ2luOjExcHggMCAyMnB4O292ZXJmbG93OmhpZGRlbn1pbnN7Y29sb3I6Izc3Nzt0ZXh0LWRlY29yYXRpb246bm9uZX1hIGltZ3tib3JkZXI6MH1AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOjc3MnB4KXtib2R5e2JhY2tncm91bmQ6bm9uZTttYXJnaW4tdG9wOjA7bWF4LXdpZHRoOm5vbmU7cGFkZGluZy1yaWdodDowfX0jbG9nb3tiYWNrZ3JvdW5kOnVybCgvL3d3dy5nb29nbGUuY29tL2ltYWdlcy9icmFuZGluZy9nb29nbGVsb2dvLzF4L2dvb2dsZWxvZ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yBzZXJ2ZXIuICA8aW5zPlRoYXTigJlzIGFsbCB3ZSBrbm93LjwvaW5zPgo=", - "BodyEncoding": { - "CodePage": 65001, - "EncodingName": "Unicode (UTF-8)", - "WebName": "utf-8" - }, - "UseTransformer": false, - "Headers": { - "Date": "Wed, 27 Oct 2017 18:57:40 GMT", - "Alt-Svc": "quic=\":443\"; ma=2592000; v=\"39,38,37,35\"", - "Referrer-Policy": "no-referrer", - "Connection": "close" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json b/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json deleted file mode 100644 index dd5018000..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "Guid": "873d495f-940e-4b86-a1f4-4f0fc7be8b8b", - "Priority": 4, - "Request": { - "Path": {}, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "BodyDestination": "SameAsSource", - "Body": "NO PATH OR URL", - "UseTransformer": false, - "Headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp/log4net.config b/examples/WireMock.Net.Console.NETCoreApp/log4net.config deleted file mode 100644 index feae99529..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp/log4net.config +++ /dev/null @@ -1,20 +0,0 @@ - - - -

- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp/nlog.config b/examples/WireMock.Net.Console.NETCoreApp/nlog.config deleted file mode 100644 index de6d9072a..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp/nlog.config +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/WireMock.Net.Console.NETCoreApp3.csproj b/examples/WireMock.Net.Console.NETCoreApp3/WireMock.Net.Console.NETCoreApp3.csproj deleted file mode 100644 index 043a83f89..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/WireMock.Net.Console.NETCoreApp3.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - Exe - netcoreapp3.1 - ../../resources/WireMock.Net-Logo.ico - - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Never - - - PreserveNewest - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs deleted file mode 100644 index 470713ac7..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/1.cs +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright © WireMock.Net - -// C# Hello \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json deleted file mode 100644 index 20565d64c..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/11111110-a633-40e8-a244-5cb80bc0ab66.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/static/mapping" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "body": "static mapping1" }, - "Headers": { - "Content-Type": "application/json", - "Test-X": [ "test 1", "test 2" ] - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json deleted file mode 100644 index d7a6cbdd7..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/791a3f31-6946-4ce7-8e6f-0237c7443275.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Guid": "791a3f31-6946-4ce7-8e6f-0237c7443275", - "Title": "", - "Priority": 0, - "Request": { - "Path": "/proxy-google-test-post", - "Methods": [ - "post" - ], - "Body": {} - }, - "Response": { - "StatusCode": 404, - "Body": "\n\n \n \n Error 404 (Not Found)!!1\n \n \n

404. That’s an error.\n

The requested URL /proxy-google-test-post was not found on this server. That’s all we know.\n", - "BodyAsBytes": "PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ZW4+CiAgPG1ldGEgY2hhcnNldD11dGYtOD4KICA8bWV0YSBuYW1lPXZpZXdwb3J0IGNvbnRlbnQ9ImluaXRpYWwtc2NhbGU9MSwgbWluaW11bS1zY2FsZT0xLCB3aWR0aD1kZXZpY2Utd2lkdGgiPgogIDx0aXRsZT5FcnJvciA0MDQgKE5vdCBGb3VuZCkhITE8L3RpdGxlPgogIDxzdHlsZT4KICAgICp7bWFyZ2luOjA7cGFkZGluZzowfWh0bWwsY29kZXtmb250OjE1cHgvMjJweCBhcmlhbCxzYW5zLXNlcmlmfWh0bWx7YmFja2dyb3VuZDojZmZmO2NvbG9yOiMyMjI7cGFkZGluZzoxNXB4fWJvZHl7bWFyZ2luOjclIGF1dG8gMDttYXgtd2lkdGg6MzkwcHg7bWluLWhlaWdodDoxODBweDtwYWRkaW5nOjMwcHggMCAxNXB4fSogPiBib2R5e2JhY2tncm91bmQ6dXJsKC8vd3d3Lmdvb2dsZS5jb20vaW1hZ2VzL2Vycm9ycy9yb2JvdC5wbmcpIDEwMCUgNXB4IG5vLXJlcGVhdDtwYWRkaW5nLXJpZ2h0OjIwNXB4fXB7bWFyZ2luOjExcHggMCAyMnB4O292ZXJmbG93OmhpZGRlbn1pbnN7Y29sb3I6Izc3Nzt0ZXh0LWRlY29yYXRpb246bm9uZX1hIGltZ3tib3Jk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LmNvbS8+PHNwYW4gaWQ9bG9nbyBhcmlhLWxhYmVsPUdvb2dsZT48L3NwYW4+PC9hPgogIDxwPjxiPjQwNC48L2I+IDxpbnM+VGhhdOKAmXMgYW4gZXJyb3IuPC9pbnM+CiAgPHA+VGhlIHJlcXVlc3RlZCBVUkwgPGNvZGU+L3Byb3h5LWdvb2dsZS10ZXN0LXBvc3Q8L2NvZGU+IHdhcyBub3QgZm91bmQgb24gdGhpcyBzZXJ2ZXIuICA8aW5zPlRoYXTigJlzIGFsbCB3ZSBrbm93LjwvaW5zPgo=", - "BodyEncoding": { - "CodePage": 65001, - "EncodingName": "Unicode (UTF-8)", - "WebName": "utf-8" - }, - "UseTransformer": false, - "Headers": { - "Date": "Wed, 27 Oct 2017 18:57:40 GMT", - "Alt-Svc": "quic=\":443\"; ma=2592000; v=\"39,38,37,35\"", - "Referrer-Policy": "no-referrer", - "Connection": "close" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json deleted file mode 100644 index dd5018000..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/873d495f-940e-4b86-a1f4-4f0fc7be8b8b.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "Guid": "873d495f-940e-4b86-a1f4-4f0fc7be8b8b", - "Priority": 4, - "Request": { - "Path": {}, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "BodyDestination": "SameAsSource", - "Body": "NO PATH OR URL", - "UseTransformer": false, - "Headers": { - "Content-Type": "application/json" - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/BodyAsFileExample.json b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/BodyAsFileExample.json deleted file mode 100644 index 633db99eb..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/BodyAsFileExample.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/bodyasfilexmltest", - "IgnoreCase": false - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "StatusCode": 200, - "Headers": {"Content-Type": "application/xml"}, - "BodyAsFile": "MyXmlResponse.xml", - "UseTransformer": false - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/MyXmlResponse.xml b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/MyXmlResponse.xml deleted file mode 100644 index 24fd28d33..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/MyXmlResponse.xml +++ /dev/null @@ -1,3 +0,0 @@ - -world - \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/array.json b/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/array.json deleted file mode 100644 index 79f338ae7..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3/__admin/mappings/array.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "Title": "1", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_1" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_1" }, - "Headers": { - "Content-Type": "application/json" - } - } - }, - { - "Title": "2", - "Request": { - "Path": { - "Matchers": [ - { - "Name": "WildcardMatcher", - "Pattern": "/mappings_static_2" - } - ] - }, - "Methods": [ - "get" - ] - }, - "Response": { - "BodyAsJson": { "result": "mappings static_2" }, - "Headers": { - "Content-Type": "application/json" - } - } - } -] \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs deleted file mode 100644 index 0037ff12a..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/Program.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © WireMock.Net - -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -namespace WireMock.Net.Console.NETCoreApp3WithCertificate -{ - class Program - { - static void Main(string[] args) - { - string url = "https://localhost:8433/"; - - var server = WireMockServer.Start(new WireMockServerSettings - { - Urls = new[] { url }, - StartAdminInterface = true, - Logger = new WireMockConsoleLogger(), - CertificateSettings = new WireMockCertificateSettings - { - X509StoreName = "My", - X509StoreLocation = "CurrentUser", - X509StoreThumbprintOrSubjectName = "FE16586076A8B3F3E2F1466803A6C4C7CA35455B" - - // X509CertificateFilePath = "example.pfx", - // X509CertificatePassword = "wiremock" - } - }); - System.Console.WriteLine("WireMockServer listening at {0}", string.Join(",", server.Urls)); - - System.Console.WriteLine("Press any key to stop the server"); - System.Console.ReadKey(); - server.Stop(); - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/WireMock.Net.Console.NETCoreApp3WithCertificate.csproj b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/WireMock.Net.Console.NETCoreApp3WithCertificate.csproj deleted file mode 100644 index 3e04aa7e3..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/WireMock.Net.Console.NETCoreApp3WithCertificate.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - Exe - netcoreapp3.1 - - - - - - - - - PreserveNewest - - - - diff --git a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/base64_encoded.cer b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/base64_encoded.cer deleted file mode 100644 index 4826bb012..000000000 --- a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/base64_encoded.cer +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEsDCCApigAwIBAgIQJbH6hSGKdoFI0B7qCIOK7jANBgkqhkiG9w0BAQUFADAU -MRIwEAYDVQQDEwlsb2NhbGhvc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c13N+NJT1s9NqpwWeK/jFK/WRN -5Hi9W3DmlGCYAwFPCyBaQagxpGuGIpNsU0hKp86W5EvJpBpmCihfwlydH8ZbkHJ9 -jx2UDgTCaDzmaiKysiTP2HHDBsReL4tjakBksa9jkTfy5ajB53F3aUVs4jvTA46L -w8wcAJlRPBz5siBrv4CH/0lBMyNeYzuqmDY3ulF4IMKNb5Kk9Ye4Pt0474z50A4v -fSah+9iwI/mubaJ5tK522AtWtUoOIAswIwpDQyNeJPOggyzT2Y2OYZdGuFAoMYuq -ZD58k4Yo+vky9K88l8NuzNJJvtgTKtT+/9qfMucxFmnvwbKEEULP3sw1FUKkPtM4 -f242FIV/XnOeloDmhGGeTB7aODB+gGCvgmOH92njjUEIv+SnYQkflQaRhhyNIACi -ZvWlP/96H+X4fUG5kVNBHY021ZWmurUDqVxWUaswg63+DfsZcYtt6wgxiAN4ssXG -wLnLPw== ------END CERTIFICATE----- diff --git a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/base64_encoded.privatekey b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/base64_encoded.privatekey deleted file mode 100644 index 3e6949a59..000000000 Binary files a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/base64_encoded.privatekey and /dev/null differ diff --git a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/example.pfx b/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/example.pfx deleted file mode 100644 index 434ba1321..000000000 Binary files a/examples/WireMock.Net.Console.NETCoreApp3WithCertificate/example.pfx and /dev/null differ diff --git a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs index 01d45bf94..6bc1fd479 100644 --- a/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs +++ b/examples/WireMock.Net.Console.Net452.Classic/MainApp.cs @@ -778,21 +778,21 @@ public static void Run() ); // https://stackoverflow.com/questions/51985089/wiremock-request-matching-with-comparison-between-two-query-parameters - server - .Given(Request.Create().WithPath("/linq") - .WithParam("from", new LinqMatcher("DateTime.Parse(it) > \"2018-03-01 00:00:00\""))) - .RespondWith(Response.Create() - .WithBody("linq match !!!") - ); - - server - .Given(Request.Create().WithPath("/linq2") - .WithBody(new LinqMatcher("it.applicationId != null")) - .UsingPost() - ) - .RespondWith(Response.Create() - .WithBody("linq2 match !!!") - ); + //server + // .Given(Request.Create().WithPath("/linq") + // .WithParam("from", new LinqMatcher("DateTime.Parse(it) > \"2018-03-01 00:00:00\""))) + // .RespondWith(Response.Create() + // .WithBody("linq match !!!") + // ); + + //server + // .Given(Request.Create().WithPath("/linq2") + // .WithBody(new LinqMatcher("it.applicationId != null")) + // .UsingPost() + // ) + // .RespondWith(Response.Create() + // .WithBody("linq2 match !!!") + // ); server .Given(Request.Create().WithPath("/myendpoint").UsingAnyMethod()) diff --git a/examples/WireMock.Net.Console.Net452.Classic/WireMock.Net.Console.Net452.Classic.csproj b/examples/WireMock.Net.Console.Net452.Classic/WireMock.Net.Console.Net452.Classic.csproj index 3e021dbff..dd57d53b4 100644 --- a/examples/WireMock.Net.Console.Net452.Classic/WireMock.Net.Console.Net452.Classic.csproj +++ b/examples/WireMock.Net.Console.Net452.Classic/WireMock.Net.Console.Net452.Classic.csproj @@ -107,6 +107,11 @@ WireMock.Net + + + 2.0.17 + + - WireMock.Net.WebApplication.Program - WireMock.Net.WebApplication - WireMock.Net.WebApplication - efcf4a18-fd7c-4622-1111-336d65290599 - OutOfProcess - - - - - - - - - - - - - - - PreserveNewest - - - - \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs b/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs deleted file mode 100644 index 784c6bdc6..000000000 --- a/examples/WireMock.Net.WebApplication.NETCore3/WireMockService.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright © WireMock.Net - -using System; -using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Newtonsoft.Json; -using WireMock.Admin.Requests; -using WireMock.Logging; -using WireMock.Server; -using WireMock.Settings; - -namespace WireMock.Net.WebApplication -{ - public class WireMockService : IWireMockService - { - private WireMockServer _server; - private readonly ILogger _logger; - private readonly WireMockServerSettings _settings; - - private class Logger : IWireMockLogger - { - private readonly ILogger _logger; - - public Logger(ILogger logger) - { - _logger = logger; - } - - public void Debug(string formatString, params object[] args) - { - _logger.LogDebug(formatString, args); - } - - public void Info(string formatString, params object[] args) - { - _logger.LogInformation(formatString, args); - } - - public void Warn(string formatString, params object[] args) - { - _logger.LogWarning(formatString, args); - } - - public void Error(string formatString, params object[] args) - { - _logger.LogError(formatString, args); - } - - public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminrequest) - { - string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented); - _logger.LogDebug("Admin[{0}] {1}", isAdminrequest, message); - } - - public void Error(string formatString, Exception exception) - { - _logger.LogError(formatString, exception.Message); - } - } - - public WireMockService(ILogger logger, IOptions settings) - { - _logger = logger; - _settings = settings.Value; - - _settings.Logger = new Logger(logger); - } - - public void Start() - { - _logger.LogInformation("WireMock.Net server starting"); - - _server = WireMockServer.Start(_settings); - - _logger.LogInformation($"WireMock.Net server settings {JsonConvert.SerializeObject(_settings)}"); - } - - public void Stop() - { - _logger.LogInformation("WireMock.Net server stopping"); - _server?.Stop(); - } - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication.NETCore3/appsettings.json b/examples/WireMock.Net.WebApplication.NETCore3/appsettings.json deleted file mode 100644 index 4b33bb6af..000000000 --- a/examples/WireMock.Net.WebApplication.NETCore3/appsettings.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "Debug": { - "LogLevel": { - "Default": "Debug" - } - }, - "Console": { - "LogLevel": { - "Default": "Debug" - } - } - }, - "WireMockServerSettings": { - "AdminUsername": "a", - "AdminPassword": "b", - "StartAdminInterface": true - } -} \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication.NETCore3/readme.md b/examples/WireMock.Net.WebApplication.NETCore3/readme.md deleted file mode 100644 index 00ebec628..000000000 --- a/examples/WireMock.Net.WebApplication.NETCore3/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# Running in IIS - -Follow these links / steps: -* https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS -* https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/development-time-iis-support?view=aspnetcore-2.1 -* Create a `web.config` file - -## IIS Sites -![IIS Multiple](resources/iis-wiremock1and2.png) - -## App Pool settings -![IIS Multiple](resources/iis-apppool.png) - -## Publish Profiles -Two example publish profiles are created: -* [IIS Localhost 1](./Properties/PublishProfiles/IIS%20Localhost%201.pubxml) -* [IIS Localhost 2](./Properties/PublishProfiles/IIS%20Localhost%202.pubxml) - -## Debugging -Select the debug "IIS" if you want to debug in IIS. -![IIS Debug](resources/iis-debug.png) diff --git a/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-apppool.png b/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-apppool.png deleted file mode 100644 index 119df1950..000000000 Binary files a/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-apppool.png and /dev/null differ diff --git a/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-debug.png b/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-debug.png deleted file mode 100644 index 0aa1936f2..000000000 Binary files a/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-debug.png and /dev/null differ diff --git a/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-wiremock1and2.png b/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-wiremock1and2.png deleted file mode 100644 index 6d50b12dd..000000000 Binary files a/examples/WireMock.Net.WebApplication.NETCore3/resources/iis-wiremock1and2.png and /dev/null differ diff --git a/examples/WireMock.Net.WebApplication.NETCore3/web.config b/examples/WireMock.Net.WebApplication.NETCore3/web.config deleted file mode 100644 index d2f21cf22..000000000 --- a/examples/WireMock.Net.WebApplication.NETCore3/web.config +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/WireMock.Net/Serialization/MatcherMapper.cs b/src/WireMock.Net/Serialization/MatcherMapper.cs index 8cadbb622..2c50f5002 100644 --- a/src/WireMock.Net/Serialization/MatcherMapper.cs +++ b/src/WireMock.Net/Serialization/MatcherMapper.cs @@ -59,8 +59,11 @@ public MatcherMapper(WireMockServerSettings settings) throw new NotSupportedException("It's not allowed to use the 'CSharpCodeMatcher' because WireMockServerSettings.AllowCSharpCodeMatcher is not set to 'true'."); - case nameof(LinqMatcher): - return new LinqMatcher(matchBehaviour, matchOperator, stringPatterns); + case "LinqMatcher": + throw new NotSupportedException("It's not allowed to use the 'LinqMatcher' due to CVE."); + + //case nameof(LinqMatcher): + // return new LinqMatcher(matchBehaviour, matchOperator, stringPatterns); case nameof(ExactMatcher): return new ExactMatcher(matchBehaviour, ignoreCase, matchOperator, stringPatterns); diff --git a/src/WireMock.Net/WireMock.Net.csproj b/src/WireMock.Net/WireMock.Net.csproj index 9c2169de3..ce138fcba 100644 --- a/src/WireMock.Net/WireMock.Net.csproj +++ b/src/WireMock.Net/WireMock.Net.csproj @@ -58,6 +58,12 @@ $(DefineConstants);TRAILINGHEADERS + + + + + + @@ -177,7 +183,7 @@ - + diff --git a/test/WireMock.Net.Tests/MappingBuilderTests.GetMappings.verified.txt b/test/WireMock.Net.Tests/MappingBuilderTests.GetMappings.verified.txt index 1f8836f78..018343e87 100644 --- a/test/WireMock.Net.Tests/MappingBuilderTests.GetMappings.verified.txt +++ b/test/WireMock.Net.Tests/MappingBuilderTests.GetMappings.verified.txt @@ -20,8 +20,9 @@ Name: test, Matchers: [ { - Name: LinqMatcher, - Pattern: it.Length < 10 + Name: ExactMatcher, + Pattern: abc, + IgnoreCase: false } ] } diff --git a/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Builder.verified.txt b/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Builder.verified.txt index 66cace4bb..acbcffa44 100644 --- a/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Builder.verified.txt +++ b/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Builder.verified.txt @@ -3,7 +3,7 @@ builder .Given(Request.Create() .UsingMethod("GET") .WithPath(new WildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, "/foo", false, WireMock.Matchers.MatchOperator.Or)) - .WithParam("test", new LinqMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, WireMock.Matchers.MatchOperator.Or, "it.Length < 10")) + .WithParam("test", new ExactMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, false, WireMock.Matchers.MatchOperator.Or, "abc")) ) .WithGuid("41372914-1838-4c67-916b-b9aacdd096ce") .RespondWith(Response.Create() diff --git a/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Server.verified.txt b/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Server.verified.txt index b7afdfe7f..d6d622514 100644 --- a/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Server.verified.txt +++ b/test/WireMock.Net.Tests/MappingBuilderTests.ToCSharpCode_Server.verified.txt @@ -3,7 +3,7 @@ server .Given(Request.Create() .UsingMethod("GET") .WithPath(new WildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, "/foo", false, WireMock.Matchers.MatchOperator.Or)) - .WithParam("test", new LinqMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, WireMock.Matchers.MatchOperator.Or, "it.Length < 10")) + .WithParam("test", new ExactMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, false, WireMock.Matchers.MatchOperator.Or, "abc")) ) .WithGuid("41372914-1838-4c67-916b-b9aacdd096ce") .RespondWith(Response.Create() diff --git a/test/WireMock.Net.Tests/MappingBuilderTests.ToJson.verified.txt b/test/WireMock.Net.Tests/MappingBuilderTests.ToJson.verified.txt index d085900b2..559f4f259 100644 --- a/test/WireMock.Net.Tests/MappingBuilderTests.ToJson.verified.txt +++ b/test/WireMock.Net.Tests/MappingBuilderTests.ToJson.verified.txt @@ -20,8 +20,9 @@ Name: test, Matchers: [ { - Name: LinqMatcher, - Pattern: it.Length < 10 + Name: ExactMatcher, + Pattern: abc, + IgnoreCase: false } ] } diff --git a/test/WireMock.Net.Tests/MappingBuilderTests.cs b/test/WireMock.Net.Tests/MappingBuilderTests.cs index 5134afb63..751468fd5 100644 --- a/test/WireMock.Net.Tests/MappingBuilderTests.cs +++ b/test/WireMock.Net.Tests/MappingBuilderTests.cs @@ -69,7 +69,7 @@ public MappingBuilderTests() _sut.Given(Request.Create() .WithPath("/foo") - .WithParam("test", new LinqMatcher("it.Length < 10")) + .WithParam("test", new ExactMatcher("abc")) .UsingGet() ) .WithGuid(MappingGuid) diff --git a/test/WireMock.Net.Tests/Matchers/MatcherTests.cs b/test/WireMock.Net.Tests/Matchers/MatcherTests.cs index 35eb09008..1b05075f3 100644 --- a/test/WireMock.Net.Tests/Matchers/MatcherTests.cs +++ b/test/WireMock.Net.Tests/Matchers/MatcherTests.cs @@ -110,18 +110,18 @@ public void JsonPartialWildcardMatcher_GetCSharpCodeArguments_ShouldReturnCorrec result.Should().StartWith("new JsonPartialWildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch,"); } - [Fact] - public void LinqMatcher_GetCSharpCodeArguments_ShouldReturnCorrectArguments() - { - // Arrange - var matcher = new LinqMatcher("it.Contains(\"test\""); - - // Act - var result = matcher.GetCSharpCodeArguments(); - - // Assert - result.Should().Be("new LinqMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, WireMock.Matchers.MatchOperator.Or, \"it.Contains(\\\"test\\\"\")"); - } + //[Fact] + //public void LinqMatcher_GetCSharpCodeArguments_ShouldReturnCorrectArguments() + //{ + // // Arrange + // var matcher = new LinqMatcher("it.Contains(\"test\""); + + // // Act + // var result = matcher.GetCSharpCodeArguments(); + + // // Assert + // result.Should().Be("new LinqMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, WireMock.Matchers.MatchOperator.Or, \"it.Contains(\\\"test\\\"\")"); + //} [Fact] public void RegexMatcher_GetCSharpCodeArguments_ShouldReturnCorrectArguments() diff --git a/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs b/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs index b9dc9abe2..ad2af9844 100644 --- a/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs +++ b/test/WireMock.Net.Tests/Matchers/RequestMatchResultTests.cs @@ -19,8 +19,8 @@ public void CompareTo_WithDifferentAverageScore_ReturnsBestMatch() result1.AddScore(typeof(WildcardMatcher), 0.9, null); var result2 = new RequestMatchResult(); - result2.AddScore(typeof(LinqMatcher), 1, null); - result2.AddScore(typeof(LinqMatcher), 1, null); + result2.AddScore(typeof(JsonMatcher), 1, null); + result2.AddScore(typeof(JsonMatcher), 1, null); var results = new[] { result1, result2 }; @@ -40,9 +40,9 @@ public void CompareTo_WithSameAverageScoreButMoreMatchers_ReturnsMatchWithMoreMa result1.AddScore(typeof(WildcardMatcher), 1, null); var result2 = new RequestMatchResult(); - result2.AddScore(typeof(LinqMatcher), 1, null); - result2.AddScore(typeof(LinqMatcher), 1, null); - result2.AddScore(typeof(LinqMatcher), 1, null); + result2.AddScore(typeof(JsonMatcher), 1, null); + result2.AddScore(typeof(JsonMatcher), 1, null); + result2.AddScore(typeof(JsonMatcher), 1, null); var results = new[] { result1, result2 }; diff --git a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs index 24b90beb4..bfd7121a6 100644 --- a/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsLinqTests.cs @@ -21,11 +21,11 @@ public class ResponseWithHandlebarsLinqTests { private readonly WireMockServerSettings _settings = new(); - private Mock mappingMock; + private readonly Mock _mappingMock; public ResponseWithHandlebarsLinqTests() { - mappingMock = new Mock(); + _mappingMock = new Mock(); var filesystemHandlerMock = new Mock(MockBehavior.Strict); filesystemHandlerMock.Setup(fs => fs.ReadResponseBodyAsString(It.IsAny())).Returns("abc"); @@ -33,7 +33,7 @@ public ResponseWithHandlebarsLinqTests() _settings.FileSystemHandler = filesystemHandlerMock.Object; } - [Fact] + [Fact(Skip = "DynamicLinq")] public async Task Response_ProvideResponse_Handlebars_Linq1_String0() { // Assign @@ -47,7 +47,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq1_String0() .WithTransformer(); // Act - var response = await responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings).ConfigureAwait(false); + var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false); // Assert JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson); @@ -55,7 +55,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq1_String0() Check.That(j["x"].ToString()).Equals("/pathtest"); } - [Fact] + [Fact(Skip = "DynamicLinq")] public async Task Response_ProvideResponse_Handlebars_Linq1_String1() { // Assign @@ -77,7 +77,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq1_String1() .WithTransformer(); // Act - var response = await responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings).ConfigureAwait(false); + var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false); // Assert JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson); @@ -85,7 +85,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq1_String1() Check.That(j["x"].ToString()).Equals("Test_123"); } - [Fact] + [Fact(Skip = "DynamicLinq")] public async Task Response_ProvideResponse_Handlebars_Linq1_String2() { // Assign @@ -107,7 +107,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq1_String2() .WithTransformer(); // Act - var response = await responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings).ConfigureAwait(false); + var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false); // Assert JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson); @@ -115,7 +115,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq1_String2() Check.That(j["x"].ToString()).Equals("{ N = Test_123, I = 9 }"); } - [Fact] + [Fact(Skip = "DynamicLinq")] public async Task Response_ProvideResponse_Handlebars_Linq2_Object() { // Assign @@ -137,7 +137,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq2_Object() .WithTransformer(); // Act - var response = await responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings).ConfigureAwait(false); + var response = await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false); // Assert JObject j = JObject.FromObject(response.Message.BodyData.BodyAsJson); @@ -145,7 +145,7 @@ public async Task Response_ProvideResponse_Handlebars_Linq2_Object() Check.That(j["x"].ToString()).Equals("{ N = Test_123, I = 9 }"); } - [Fact] + [Fact(Skip = "DynamicLinq")] public void Response_ProvideResponse_Handlebars_Linq_Throws_ArgumentException() { // Assign @@ -162,7 +162,7 @@ public void Response_ProvideResponse_Handlebars_Linq_Throws_ArgumentException() .WithTransformer(); // Act - Check.ThatAsyncCode(() => responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings)).Throws(); + Check.ThatAsyncCode(() => responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings)).Throws(); } [Fact] @@ -178,7 +178,7 @@ public void Response_ProvideResponse_Handlebars_Linq1_Throws_HandlebarsException .WithTransformer(); // Act - Check.ThatAsyncCode(() => responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings)).Throws(); + Check.ThatAsyncCode(() => responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings)).Throws(); } [Fact] @@ -202,7 +202,7 @@ public void Response_ProvideResponse_Handlebars_Linq1_ParseError_Throws_Exceptio .WithTransformer(); // Act - Func a = async () => await responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings).ConfigureAwait(false); + Func a = async () => await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false); // Assert a.Should().ThrowAsync(); @@ -229,7 +229,7 @@ public void Response_ProvideResponse_Handlebars_Linq2_ParseError_Throws_Exceptio .WithTransformer(); // Act - Func a = async () => await responseBuilder.ProvideResponseAsync(mappingMock.Object, request, _settings).ConfigureAwait(false); + Func a = async () => await responseBuilder.ProvideResponseAsync(_mappingMock.Object, request, _settings).ConfigureAwait(false); // Assert a.Should().ThrowAsync(); diff --git a/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs b/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs index da31548a2..3e270f0cc 100644 --- a/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs +++ b/test/WireMock.Net.Tests/Serialization/MatcherMapperTests.cs @@ -302,41 +302,41 @@ public void MatcherMapper_Map_MatcherModel_Exception() Check.ThatCode(() => _sut.Map(model)).Throws(); } - [Fact] - public void MatcherMapper_Map_MatcherModel_LinqMatcher_Pattern() - { - // Assign - var model = new MatcherModel - { - Name = "LinqMatcher", - Pattern = "p" - }; - - // Act - var matcher = (LinqMatcher)_sut.Map(model)!; - - // Assert - matcher.MatchBehaviour.Should().Be(MatchBehaviour.AcceptOnMatch); - matcher.GetPatterns().Should().Contain("p"); - } - - [Fact] - public void MatcherMapper_Map_MatcherModel_LinqMatcher_Patterns() - { - // Assign - var model = new MatcherModel - { - Name = "LinqMatcher", - Patterns = ["p1", "p2"] - }; - - // Act - var matcher = (LinqMatcher)_sut.Map(model)!; - - // Assert - matcher.MatchBehaviour.Should().Be(MatchBehaviour.AcceptOnMatch); - matcher.GetPatterns().Should().Contain("p1", "p2"); - } + //[Fact] + //public void MatcherMapper_Map_MatcherModel_LinqMatcher_Pattern() + //{ + // // Assign + // var model = new MatcherModel + // { + // Name = "LinqMatcher", + // Pattern = "p" + // }; + + // // Act + // var matcher = (LinqMatcher)_sut.Map(model)!; + + // // Assert + // matcher.MatchBehaviour.Should().Be(MatchBehaviour.AcceptOnMatch); + // matcher.GetPatterns().Should().Contain("p"); + //} + + //[Fact] + //public void MatcherMapper_Map_MatcherModel_LinqMatcher_Patterns() + //{ + // // Assign + // var model = new MatcherModel + // { + // Name = "LinqMatcher", + // Patterns = ["p1", "p2"] + // }; + + // // Act + // var matcher = (LinqMatcher)_sut.Map(model)!; + + // // Assert + // matcher.MatchBehaviour.Should().Be(MatchBehaviour.AcceptOnMatch); + // matcher.GetPatterns().Should().Contain("p1", "p2"); + //} [Fact] public void MatcherMapper_Map_MatcherModel_JsonMatcher_Pattern_As_String() diff --git a/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj b/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj index 40b38c666..038dafafb 100644 --- a/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj +++ b/test/WireMock.Net.Tests/WireMock.Net.Tests.csproj @@ -34,6 +34,7 @@ +