From a9c0c6b670a39744d0a894a5a5b80e65a0d95471 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Tue, 17 Jul 2018 08:20:44 +0200 Subject: [PATCH] Support running WireMock.Net as a sub-app in IIS (#164) (#158) * Update examples (#158) * IIS debug * PathBase logic * 1.0.4.5-preview-01 * Fix project and readme * Fix issues * fix picture alignment * Add IIS publish examples * 1.0.4.5 --- WireMock.Net Solution.sln | 2 +- .../WireMock.Net.StandAlone.NETCoreApp.csproj | 3 +- .../{run1.cmd => run10.cmd} | 0 .../{run2.cmd => run20.cmd} | 0 .../run21.cmd | 1 + .../PublishProfiles/IIS Localhost 1.pubxml | 31 ++++++++++ .../PublishProfiles/IIS Localhost 2.pubxml | 31 ++++++++++ .../Properties/launchSettings.json | 10 ++++ ...reMock.Net.WebApplication.NETCore2.csproj} | 11 ++-- .../WireMock.Net.WebApplication/readme.md | 21 +++++++ .../resources/iis-apppool.png | Bin 0 -> 8063 bytes .../resources/iis-debug.png | Bin 0 -> 37367 bytes .../resources/iis-wiremock1and2.png | Bin 0 -> 14103 bytes .../WireMock.Net.WebApplication/web.config | 12 ++++ .../WireMock.Net.StandAlone.csproj | 2 +- .../Admin/Requests/LogRequestModel.cs | 12 +++- src/WireMock.Net/Models/UrlDetails.cs | 51 +++++++++++++++++ src/WireMock.Net/Owin/OwinRequestMapper.cs | 6 +- src/WireMock.Net/RequestMessage.cs | 47 +++++++++++----- .../Serialization/LogEntryMapper.cs | 4 +- src/WireMock.Net/Server/FluentMockServer.cs | 3 +- src/WireMock.Net/Util/UrlUtils.cs | 38 +++++++++++++ src/WireMock.Net/WireMock.Net.csproj | 2 +- .../Http/HttpRequestMessageHelperTests.cs | 15 ++--- test/WireMock.Net.Tests/RequestCookieTests.cs | 3 +- .../RequestMessageBodyMatcherTests.cs | 13 +++-- .../RequestMessageCompositeMatcherTests.cs | 7 ++- .../RequestMessageCookieMatcherTests.cs | 17 +++--- .../RequestMessageHeaderMatcherTests.cs | 17 +++--- .../RequestMessageParamMatcherTests.cs | 15 ++--- .../WireMock.Net.Tests/RequestMessageTests.cs | 13 +++-- test/WireMock.Net.Tests/RequestTests.cs | 19 ++++--- .../RequestWithBodyTests.cs | 29 +++++----- .../RequestWithClientIPTests.cs | 9 +-- .../RequestWithPathTests.cs | 29 +++++----- .../WireMock.Net.Tests/RequestWithUrlTests.cs | 7 ++- .../ResponseCreateTests.cs | 3 +- .../ResponseWithBodyTests.cs | 15 ++--- ...ests.cs => ResponseWithHandlebarsTests.cs} | 52 ++++++++++++++--- .../ResponseWithHeadersTests.cs | 7 ++- test/WireMock.Net.Tests/ResponseTests.cs | 3 +- test/WireMock.Net.Tests/Util/UrlUtilsTests.cs | 53 ++++++++++++++++++ 42 files changed, 474 insertions(+), 139 deletions(-) rename examples/WireMock.Net.StandAlone.NETCoreApp/{run1.cmd => run10.cmd} (100%) rename examples/WireMock.Net.StandAlone.NETCoreApp/{run2.cmd => run20.cmd} (100%) create mode 100644 examples/WireMock.Net.StandAlone.NETCoreApp/run21.cmd create mode 100644 examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 1.pubxml create mode 100644 examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 2.pubxml rename examples/WireMock.Net.WebApplication/{WireMock.Net.WebApplication.csproj => WireMock.Net.WebApplication.NETCore2.csproj} (75%) create mode 100644 examples/WireMock.Net.WebApplication/readme.md create mode 100644 examples/WireMock.Net.WebApplication/resources/iis-apppool.png create mode 100644 examples/WireMock.Net.WebApplication/resources/iis-debug.png create mode 100644 examples/WireMock.Net.WebApplication/resources/iis-wiremock1and2.png create mode 100644 examples/WireMock.Net.WebApplication/web.config create mode 100644 src/WireMock.Net/Models/UrlDetails.cs create mode 100644 src/WireMock.Net/Util/UrlUtils.cs rename test/WireMock.Net.Tests/ResponseBuilderTests/{ResponseWithBodyHandlebarsTests.cs => ResponseWithHandlebarsTests.cs} (65%) create mode 100644 test/WireMock.Net.Tests/Util/UrlUtilsTests.cs diff --git a/WireMock.Net Solution.sln b/WireMock.Net Solution.sln index 1c3c8853..b6162721 100644 --- a/WireMock.Net Solution.sln +++ b/WireMock.Net Solution.sln @@ -42,7 +42,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.StandAlone.Net EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.NET452", "examples\WireMock.Net.ConsoleApplication\WireMock.Net.Console.NET452.csproj", "{668F689E-57B4-422E-8846-C0FF643CA268}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.WebApplication", "examples\WireMock.Net.WebApplication\WireMock.Net.WebApplication.csproj", "{049539C1-7A66-4559-AD7A-B1C73B97CBB0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.WebApplication.NETCore2", "examples\WireMock.Net.WebApplication\WireMock.Net.WebApplication.NETCore2.csproj", "{049539C1-7A66-4559-AD7A-B1C73B97CBB0}" 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 diff --git a/examples/WireMock.Net.StandAlone.NETCoreApp/WireMock.Net.StandAlone.NETCoreApp.csproj b/examples/WireMock.Net.StandAlone.NETCoreApp/WireMock.Net.StandAlone.NETCoreApp.csproj index 5b2ac302..8dc82ad6 100644 --- a/examples/WireMock.Net.StandAlone.NETCoreApp/WireMock.Net.StandAlone.NETCoreApp.csproj +++ b/examples/WireMock.Net.StandAlone.NETCoreApp/WireMock.Net.StandAlone.NETCoreApp.csproj @@ -2,8 +2,9 @@ Exe - netcoreapp2.0;netcoreapp1.1 + netcoreapp2.1;netcoreapp2.0;netcoreapp1.1 ../../WireMock.Net-Logo.ico + WireMock.Net.StandAlone.NETCoreApp.Program diff --git a/examples/WireMock.Net.StandAlone.NETCoreApp/run1.cmd b/examples/WireMock.Net.StandAlone.NETCoreApp/run10.cmd similarity index 100% rename from examples/WireMock.Net.StandAlone.NETCoreApp/run1.cmd rename to examples/WireMock.Net.StandAlone.NETCoreApp/run10.cmd diff --git a/examples/WireMock.Net.StandAlone.NETCoreApp/run2.cmd b/examples/WireMock.Net.StandAlone.NETCoreApp/run20.cmd similarity index 100% rename from examples/WireMock.Net.StandAlone.NETCoreApp/run2.cmd rename to examples/WireMock.Net.StandAlone.NETCoreApp/run20.cmd diff --git a/examples/WireMock.Net.StandAlone.NETCoreApp/run21.cmd b/examples/WireMock.Net.StandAlone.NETCoreApp/run21.cmd new file mode 100644 index 00000000..8dd3a9bb --- /dev/null +++ b/examples/WireMock.Net.StandAlone.NETCoreApp/run21.cmd @@ -0,0 +1 @@ +dotnet run --framework netcoreapp2.1 \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 1.pubxml b/examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 1.pubxml new file mode 100644 index 00000000..df22ade6 --- /dev/null +++ b/examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 1.pubxml @@ -0,0 +1,31 @@ + + + + + MSDeploy + Debug + Any CPU + + True + False + netcoreapp2.0 + win10-x64 + 049539c1-7a66-4559-ad7a-b1c73b97cbb0 + true + <_IsPortable>false + localhost + Default Web Site/wiremock1 + + True + InProc + False + + <_SavePWD>False + + + + + \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 2.pubxml b/examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 2.pubxml new file mode 100644 index 00000000..e011abc5 --- /dev/null +++ b/examples/WireMock.Net.WebApplication/Properties/PublishProfiles/IIS Localhost 2.pubxml @@ -0,0 +1,31 @@ + + + + + MSDeploy + Debug + Any CPU + + True + False + netcoreapp2.0 + win10-x64 + 049539c1-7a66-4559-ad7a-b1c73b97cbb1 + true + <_IsPortable>false + localhost + Default Web Site/wiremock2 + + True + InProc + False + + <_SavePWD>False + + + + + \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication/Properties/launchSettings.json b/examples/WireMock.Net.WebApplication/Properties/launchSettings.json index b056cf7a..fd7a2608 100644 --- a/examples/WireMock.Net.WebApplication/Properties/launchSettings.json +++ b/examples/WireMock.Net.WebApplication/Properties/launchSettings.json @@ -2,6 +2,10 @@ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, + "iis": { + "applicationUrl": "http://localhost//wiremock", + "sslPort": 0 + }, "iisExpress": { "applicationUrl": "http://localhost:56513/", "sslPort": 0 @@ -23,6 +27,12 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "applicationUrl": "http://localhost:56514/" + }, + "IIS": { + "commandName": "IIS", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "development" + } } } } \ No newline at end of file diff --git a/examples/WireMock.Net.WebApplication/WireMock.Net.WebApplication.csproj b/examples/WireMock.Net.WebApplication/WireMock.Net.WebApplication.NETCore2.csproj similarity index 75% rename from examples/WireMock.Net.WebApplication/WireMock.Net.WebApplication.csproj rename to examples/WireMock.Net.WebApplication/WireMock.Net.WebApplication.NETCore2.csproj index 2df47b45..8269e247 100644 --- a/examples/WireMock.Net.WebApplication/WireMock.Net.WebApplication.csproj +++ b/examples/WireMock.Net.WebApplication/WireMock.Net.WebApplication.NETCore2.csproj @@ -1,17 +1,16 @@ - + netcoreapp2.0 win10-x64 + WireMock.Net.WebApplication.Program + WireMock.Net.WebApplication + WireMock.Net.WebApplication - - - - - + diff --git a/examples/WireMock.Net.WebApplication/readme.md b/examples/WireMock.Net.WebApplication/readme.md new file mode 100644 index 00000000..61d5b1a3 --- /dev/null +++ b/examples/WireMock.Net.WebApplication/readme.md @@ -0,0 +1,21 @@ +# 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/resources/iis-apppool.png b/examples/WireMock.Net.WebApplication/resources/iis-apppool.png new file mode 100644 index 0000000000000000000000000000000000000000..119df1950067844e4e04019790b555397a3403ef GIT binary patch literal 8063 zcmb7pc{tSH-}gsRq8dw5Bukc%^Iw=$&HYV*>!-6jWcw z8~~UgjE|S~7-NQ8sZ^Zt!{leKcN4%2Tv%WXm|bre-vEG`6!!i5ER6Aqhx*oj0C2kF z&&PyI^;iY~!81^u8y1i3m-8GFFLdQa>gh;OeT6}BQ6d-L%!v`WCxazaHFbjGW7F&5 zSEg74B!+sqINoqb2F{U>om@12S?!+!!$0S!4y=yTi5A%{nBM!JV%GqddJj6i;PwjUaB6td%X0ODBBpIMhy~!_z6EE#!BN9Z z5@8i-)MEVC;f+lYiv4v2!O6^NCj^NSdc%&_<dlR;P}Eq5{b?3?vrV& zxW3&mSbFR2{hjgA)*@wP<)O*om_#3EXE6=_lf5W;R6HksvtT@DTB~nbVz>gX-!Mhd zwEz6f6;v{{x6?i*T5NEw!Kz-s`%$8Px8t7RgDWv|y>&)A+W}l&>Z2w)=i7GseJqNH z<*>o~Yd!t%*4mGP3K}-qIEQEKXlt*U3DoW+&Mr%5k*g$vZp@xY^i&9OdJ2{O5S86L zoT=4He|J2fynE%SyWf;?$R|9kCrM@cFCEw@>j`(hp|p|=oYRMuuPjS#IVn)%X*a`m zp9n7c-wU5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cA8u#Pw##5eB zb7@?BIeAV$?e6~)xNn1*+arw247}@scsGvv>_HToWE$3zZN4tp&Wn-Ll$RcHFEl(@ zNGMO4$Q<={({yW0?3<2A+P_E9?39HvVw)4iN+6W$+i-PuWjKmIrGKYC(??zZbb?1v zIp4qw2f9bRHvbK-r!SOkRwexT4_d!Y+NenS1GrC+ia`7`FPw+x3nB!SL_pAb5_{bY z?`S?~P<@lV+jL}5t0~#kkKQSo6^j#v2k}4+-(YcyKa1zuJ74!2i&%d-bItSU{OOE| zhxLHvdhRS-^YkoS`&A_ax^H;;pHJvp@nJ!B< za&idh-M^_@z+1Wwo}`(SJSO8Li>;)#UMqquIy#jfu9%KLeJ9K$r*5^`41lInuBp5G6O76O`eZFS#`?-A(kmUyKNzsr;! zNeM5-iQroD*BGdR8NxD-%40=+IEN-dU+(*_7K_Qt&Nn>6M||54rf=N$!pZEs>$MS< zxprFhHjO|zv$>iw=Fw+_QH*$%f?W>{-ucIIGPW}c7;3~hD>We8mRy%TyVxBDe6GD+ zp&8gz{e7ySt&Pw3peIms1qAVN$MG5)`zuS)9wjOwm`Tvl7gxDCM@yo|OF^;h%8x4u zk0dpb%F>v;3Ruf>5|&|A}k{v*EClZwAJM=Osb zbhW&?oC}mL7qvE1L67Rm36@Qe%$6Rbb zEV>8+J`t&0zRL`Kp}@RqyJBEc^< z-c^ezOoW2p%qj3sc85d_A=Bhz*`-Wv5teocWZ}}*^niBcibNh{w{z-bVgseSDhhY7OUY7DR?O57<+QM^I;IRsr_K~4opof2xx@qYyjS;x%PiiFGfOAITia?}z zb_SVPk3As_PV0Y|3NY{3I5Bm|5$h4c*v*lBPgdaOwq~@^g>UvZ^9?Qky+^D6-+z;h g7_T;Kznk|WoFP}PLR^&oJgfsyT@xM5&3jS*2UuB|u>b%7 literal 0 HcmV?d00001 diff --git a/examples/WireMock.Net.WebApplication/resources/iis-debug.png b/examples/WireMock.Net.WebApplication/resources/iis-debug.png new file mode 100644 index 0000000000000000000000000000000000000000..0a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MKc(55&l^fzpoFC8$83#Kely-4tru%_>_&5KY)_9RE+aR* zsx!j+NNkot`~0~;ErjCh>`D8&=FA4AfOHiA6u?~pL{Q724fnt?>-+Vmxk+{FR)TEr zRMG|9d@GIQ81z8^D^^B&V%ne@6Mj&o@BmKpg#zz9d-#hfoMgW>aT-IQoX3HWIm!B7 zqjrMvT^(009cgW=>zgJ(9FHdFESZoblOpRC(iYrc2c{J*PNt?|&w}v{=b2%1i1!4I zXmk**Y8N0_TJpx#^a?JZnNq>kD zmosx?qcW7`2YnV-W{JNeU}`C7W*uurR|{gY|<;GmTWCn z;NF#?=ClRUweUi%Z7Ih?LKJR!G&9qekW^`dk+e5+-gCAa&z-1e1Z##boAq`nfFUUc z?KUs)XdcGtXM*(%{)4%@I3KF4>x{`j($272+Fr$VE;d5|*#AHD)Buartykp8kcM?x z0r~^!{gsh|DLjopf7$0^fOQ^Sx6anWpz9^!H}{}p`PcY>NH%iD!{%AzLY6ga$-2r& zwmZ>Rf_ExR(fDp#>pc%*%V6MF{D%yJc-w;I>*6v8T2P#T@5du{mlafdrj`d&8X<_q z8jNwBIdlC^Ob4J*QMEnbu!nrD0mM2r1%K@-#3-b-u+yDdiq7T7{&6EbrWfz MX96zOy?W<=0XQ!%ssI20 literal 0 HcmV?d00001 diff --git a/examples/WireMock.Net.WebApplication/resources/iis-wiremock1and2.png b/examples/WireMock.Net.WebApplication/resources/iis-wiremock1and2.png new file mode 100644 index 0000000000000000000000000000000000000000..6d50b12ddc0c45aa1398678b0c1c4ab440cacef5 GIT binary patch literal 14103 zcmZ{Lby(By`mmJ5Bt~~imxOdPK?~e zsGK0*hXcr#l1h>xs4+w!n-vbu76bsY9g^$GHOI_xz*Mo5kY!1u{!=aE=CB=dmtwq`1*eX z^6!So3WrFUs*)#rRkTgwmV+Hr>l3fWt{E`&%SG(} zB6GBgVK-i%oT^|$tUEE-&-Bl5s_()G=^^`O9+AAraZi9ku}$Rl-tXsT|s*9>A{ zWf#3Hmln*>fIij*k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h_%Kk(^Nr_jQ2BeNR9_s>E9 zajG+4_Qe}igx={MMjXXg|F8mAjW^Eu%)hjS0?*T1N~MUBdlG%N7^eQNrSb5i4I7#b nc+Vq+`yW;P1#m#mR2cDca<_g}Kj436d+}aI8B{6tA@KhJ;NqlV literal 0 HcmV?d00001 diff --git a/examples/WireMock.Net.WebApplication/web.config b/examples/WireMock.Net.WebApplication/web.config new file mode 100644 index 00000000..2417b04e --- /dev/null +++ b/examples/WireMock.Net.WebApplication/web.config @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj b/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj index e6cb1e8f..d8d1d05e 100644 --- a/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj +++ b/src/WireMock.Net.StandAlone/WireMock.Net.StandAlone.csproj @@ -3,7 +3,7 @@ Lightweight StandAlone Http Mocking Server for .Net. WireMock.Net.StandAlone - 1.0.4.4 + 1.0.4.5 Stef Heyenrath net452;net46;netstandard1.3;netstandard2.0 true diff --git a/src/WireMock.Net/Admin/Requests/LogRequestModel.cs b/src/WireMock.Net/Admin/Requests/LogRequestModel.cs index 20b4ea0a..fa9bdcb7 100644 --- a/src/WireMock.Net/Admin/Requests/LogRequestModel.cs +++ b/src/WireMock.Net/Admin/Requests/LogRequestModel.cs @@ -26,7 +26,17 @@ namespace WireMock.Admin.Requests public string Path { get; set; } /// - ///The absolete URL. + /// The Absolute Path. + /// + public string AbsolutePath { get; set; } + + /// + /// Gets the url (relative). + /// + public string Url { get; set; } + + /// + /// The absolete URL. /// public string AbsoluteUrl { get; set; } diff --git a/src/WireMock.Net/Models/UrlDetails.cs b/src/WireMock.Net/Models/UrlDetails.cs new file mode 100644 index 00000000..c23f78ed --- /dev/null +++ b/src/WireMock.Net/Models/UrlDetails.cs @@ -0,0 +1,51 @@ +using System; +using WireMock.Validation; + +namespace WireMock.Models +{ + /// + /// UrlDetails + /// + public class UrlDetails + { + /// + /// Gets the url (relative). + /// + public Uri Url { get; } + + /// + /// Gets the AbsoluteUrl. + /// + public Uri AbsoluteUrl { get; } + + /// + /// Initializes a new instance of the class. + /// + /// The URL. + public UrlDetails(string url) : this(new Uri(url)) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The URL. + public UrlDetails(Uri url) : this(url, url) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The absolute URL. + /// The URL (relative). + public UrlDetails(Uri absoluteUrl, Uri url) + { + Check.NotNull(absoluteUrl, nameof(absoluteUrl)); + Check.NotNull(url, nameof(url)); + + AbsoluteUrl = absoluteUrl; + Url = url; + } + } +} \ No newline at end of file diff --git a/src/WireMock.Net/Owin/OwinRequestMapper.cs b/src/WireMock.Net/Owin/OwinRequestMapper.cs index d8df15c3..57211735 100644 --- a/src/WireMock.Net/Owin/OwinRequestMapper.cs +++ b/src/WireMock.Net/Owin/OwinRequestMapper.cs @@ -31,10 +31,10 @@ namespace WireMock.Owin ) { #if !NETSTANDARD - Uri url = request.Uri; + var urldetails = UrlUtils.Parse(request.Uri, request.PathBase); string clientIP = request.RemoteIpAddress; #else - Uri url = new Uri(request.GetEncodedUrl()); + var urldetails = UrlUtils.Parse(new Uri(request.GetEncodedUrl()), request.PathBase); var connection = request.HttpContext.Connection; string clientIP = connection.RemoteIpAddress.IsIPv4MappedToIPv6 ? connection.RemoteIpAddress.MapToIPv4().ToString() @@ -68,7 +68,7 @@ namespace WireMock.Owin body = await BodyParser.Parse(request.Body, request.ContentType); } - return new RequestMessage(url, method, clientIP, body, headers, cookies) { DateTime = DateTime.Now }; + return new RequestMessage(urldetails, method, clientIP, body, headers, cookies) { DateTime = DateTime.Now }; } private bool ShouldParseBody(string method) diff --git a/src/WireMock.Net/RequestMessage.cs b/src/WireMock.Net/RequestMessage.cs index bd5126ae..f60f520f 100644 --- a/src/WireMock.Net/RequestMessage.cs +++ b/src/WireMock.Net/RequestMessage.cs @@ -4,13 +4,14 @@ using System.Linq; using System.Text; using System.Net; using JetBrains.Annotations; +using WireMock.Models; using WireMock.Util; using WireMock.Validation; namespace WireMock { /// - /// The request. + /// The RequestMessage. /// public class RequestMessage { @@ -20,25 +21,40 @@ namespace WireMock public string ClientIP { get; } /// - /// Gets the url. + /// Gets the url (relative). /// public string Url { get; } + /// + /// Gets the AbsoluteUrl. + /// + public string AbsoluteUrl { get; } + /// /// Gets the DateTime. /// public DateTime DateTime { get; set; } /// - /// Gets the path. + /// Gets the path (relative). /// public string Path { get; } + /// + /// Gets the AbsolutePath. + /// + public string AbsolutePath { get; } + /// /// Gets the path segments. /// public string[] PathSegments { get; } + /// + /// Gets the absolute path segments. + /// + public string[] AbsolutePathSegments { get; } + /// /// Gets the method. /// @@ -107,25 +123,30 @@ namespace WireMock /// /// Initializes a new instance of the class. /// - /// The original url. + /// The original url details. /// The HTTP method. /// The client IP Address. /// The body. /// The headers. /// The cookies. - public RequestMessage([NotNull] Uri url, [NotNull] string method, [NotNull] string clientIP, [CanBeNull] BodyData body = null, [CanBeNull] IDictionary headers = null, [CanBeNull] IDictionary cookies = null) + public RequestMessage([NotNull] UrlDetails urlDetails, [NotNull] string method, [NotNull] string clientIP, [CanBeNull] BodyData body = null, [CanBeNull] IDictionary headers = null, [CanBeNull] IDictionary cookies = null) { - Check.NotNull(url, nameof(url)); + Check.NotNull(urlDetails, nameof(urlDetails)); Check.NotNull(method, nameof(method)); Check.NotNull(clientIP, nameof(clientIP)); - Url = url.ToString(); - Protocol = url.Scheme; - Host = url.Host; - Port = url.Port; - Origin = $"{url.Scheme}://{url.Host}:{url.Port}"; - Path = WebUtility.UrlDecode(url.AbsolutePath); + AbsoluteUrl = urlDetails.AbsoluteUrl.ToString(); + Url = urlDetails.Url.ToString(); + Protocol = urlDetails.Url.Scheme; + Host = urlDetails.Url.Host; + Port = urlDetails.Url.Port; + Origin = $"{Protocol}://{Host}:{Port}"; + + AbsolutePath = WebUtility.UrlDecode(urlDetails.AbsoluteUrl.AbsolutePath); + Path = WebUtility.UrlDecode(urlDetails.Url.AbsolutePath); PathSegments = Path.Split('/').Skip(1).ToArray(); + AbsolutePathSegments = AbsolutePath.Split('/').Skip(1).ToArray(); + Method = method.ToLower(); ClientIP = clientIP; @@ -136,7 +157,7 @@ namespace WireMock Headers = headers?.ToDictionary(header => header.Key, header => new WireMockList(header.Value)); Cookies = cookies; - RawQuery = WebUtility.UrlDecode(url.Query); + RawQuery = WebUtility.UrlDecode(urlDetails.Url.Query); Query = ParseQuery(RawQuery); } diff --git a/src/WireMock.Net/Serialization/LogEntryMapper.cs b/src/WireMock.Net/Serialization/LogEntryMapper.cs index cfa27736..ee4a539b 100644 --- a/src/WireMock.Net/Serialization/LogEntryMapper.cs +++ b/src/WireMock.Net/Serialization/LogEntryMapper.cs @@ -17,7 +17,9 @@ namespace WireMock.Serialization DateTime = logEntry.RequestMessage.DateTime, ClientIP = logEntry.RequestMessage.ClientIP, Path = logEntry.RequestMessage.Path, - AbsoluteUrl = logEntry.RequestMessage.Url, + AbsolutePath = logEntry.RequestMessage.AbsolutePath, + Url = logEntry.RequestMessage.Url, + AbsoluteUrl = logEntry.RequestMessage.AbsoluteUrl, Query = logEntry.RequestMessage.Query, Method = logEntry.RequestMessage.Method, Body = logEntry.RequestMessage.Body, diff --git a/src/WireMock.Net/Server/FluentMockServer.cs b/src/WireMock.Net/Server/FluentMockServer.cs index 5dc0f1af..f4df8a4c 100644 --- a/src/WireMock.Net/Server/FluentMockServer.cs +++ b/src/WireMock.Net/Server/FluentMockServer.cs @@ -273,8 +273,7 @@ namespace WireMock.Server public void Stop() { var result = _httpServer?.StopAsync(); - if (result != null) - result.Wait(); //wait for stop to actually happen + result?.Wait(); // wait for stop to actually happen } #endregion diff --git a/src/WireMock.Net/Util/UrlUtils.cs b/src/WireMock.Net/Util/UrlUtils.cs new file mode 100644 index 00000000..7ccb08f9 --- /dev/null +++ b/src/WireMock.Net/Util/UrlUtils.cs @@ -0,0 +1,38 @@ +using System; +using JetBrains.Annotations; +using WireMock.Models; +#if !NETSTANDARD +using Microsoft.Owin; +#else +using Microsoft.AspNetCore.Http; +#endif + +namespace WireMock.Util +{ + internal static class UrlUtils + { + public static UrlDetails Parse([NotNull] Uri uri, PathString pathBase) + { + if (!pathBase.HasValue) + { + return new UrlDetails(uri, uri); + } + + var builder = new UriBuilder(uri); + builder.Path = RemoveFirst(builder.Path, pathBase.Value); + + return new UrlDetails(uri, builder.Uri); + } + + private static string RemoveFirst(string text, string search) + { + int pos = text.IndexOf(search); + if (pos < 0) + { + return text; + } + + return text.Substring(0, pos) + text.Substring(pos + search.Length); + } + } +} diff --git a/src/WireMock.Net/WireMock.Net.csproj b/src/WireMock.Net/WireMock.Net.csproj index ac18e8c9..0c844251 100644 --- a/src/WireMock.Net/WireMock.Net.csproj +++ b/src/WireMock.Net/WireMock.Net.csproj @@ -3,7 +3,7 @@ Lightweight Http Mocking Server for .Net, inspired by WireMock from the Java landscape. WireMock.Net - 1.0.4.4 + 1.0.4.5 Stef Heyenrath net452;net46;netstandard1.3;netstandard2.0 true diff --git a/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs b/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs index 56453bea..c2c8b1ed 100644 --- a/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs +++ b/test/WireMock.Net.Tests/Http/HttpRequestMessageHelperTests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Text; using NFluent; using WireMock.Http; +using WireMock.Models; using WireMock.Util; using Xunit; @@ -21,7 +22,7 @@ namespace WireMock.Net.Tests.Http { BodyAsString = "hello" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, headers); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, headers); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); @@ -38,7 +39,7 @@ namespace WireMock.Net.Tests.Http { BodyAsBytes = Encoding.UTF8.GetBytes("hi") }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "GET", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", ClientIp, body); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); @@ -55,7 +56,7 @@ namespace WireMock.Net.Tests.Http { BodyAsJson = new { x = 42 } }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "GET", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", ClientIp, body); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); @@ -73,7 +74,7 @@ namespace WireMock.Net.Tests.Http { BodyAsJson = new { x = 42 } }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "GET", ClientIp, body, headers); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", ClientIp, body, headers); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); @@ -92,7 +93,7 @@ namespace WireMock.Net.Tests.Http { BodyAsString = "hello" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, headers); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, headers); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); @@ -110,7 +111,7 @@ namespace WireMock.Net.Tests.Http { BodyAsString = "hello" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, headers); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, headers); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); @@ -128,7 +129,7 @@ namespace WireMock.Net.Tests.Http { BodyAsString = "hello" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, headers); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, headers); // Act var message = HttpRequestMessageHelper.Create(request, "http://url"); diff --git a/test/WireMock.Net.Tests/RequestCookieTests.cs b/test/WireMock.Net.Tests/RequestCookieTests.cs index 84392417..9acba459 100644 --- a/test/WireMock.Net.Tests/RequestCookieTests.cs +++ b/test/WireMock.Net.Tests/RequestCookieTests.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using NFluent; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.RequestBuilders; using Xunit; @@ -18,7 +19,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().UsingAnyMethod().WithCookie("session", "a*"); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, null, null, new Dictionary { { "session", "abc" } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, null, null, new Dictionary { { "session", "abc" } }); // then var requestMatchResult = new RequestMatchResult(); diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs index 0b6a4ab2..d5cd891e 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageBodyMatcherTests.cs @@ -3,6 +3,7 @@ using Moq; using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.Util; using Xunit; @@ -21,7 +22,7 @@ namespace WireMock.Net.Tests.RequestMatchers var stringMatcherMock = new Mock(); stringMatcherMock.Setup(m => m.IsMatch(It.IsAny())).Returns(0.5d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", body); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", body); var matcher = new RequestMessageBodyMatcher(stringMatcherMock.Object); @@ -48,7 +49,7 @@ namespace WireMock.Net.Tests.RequestMatchers var stringMatcherMock = new Mock(); stringMatcherMock.Setup(m => m.IsMatch(It.IsAny())).Returns(0.5d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", body); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", body); var matcher = new RequestMessageBodyMatcher(stringMatcherMock.Object); @@ -75,7 +76,7 @@ namespace WireMock.Net.Tests.RequestMatchers var stringMatcherMock = new Mock(); stringMatcherMock.Setup(m => m.IsMatch(It.IsAny())).Returns(0.5d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", body); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", body); var matcher = new RequestMessageBodyMatcher(stringMatcherMock.Object); @@ -102,7 +103,7 @@ namespace WireMock.Net.Tests.RequestMatchers var stringMatcherMock = new Mock(); stringMatcherMock.Setup(m => m.IsMatch(It.IsAny())).Returns(0.5d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", body); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", body); var matcher = new RequestMessageBodyMatcher(stringMatcherMock.Object); @@ -128,7 +129,7 @@ namespace WireMock.Net.Tests.RequestMatchers var objectMatcherMock = new Mock(); objectMatcherMock.Setup(m => m.IsMatch(It.IsAny())).Returns(0.5d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", body); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", body); var matcher = new RequestMessageBodyMatcher(objectMatcherMock.Object); @@ -154,7 +155,7 @@ namespace WireMock.Net.Tests.RequestMatchers var objectMatcherMock = new Mock(); objectMatcherMock.Setup(m => m.IsMatch(It.IsAny())).Returns(0.5d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", body); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", body); var matcher = new RequestMessageBodyMatcher(objectMatcherMock.Object); diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs index 3a51f36d..c20f94ec 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCompositeMatcherTests.cs @@ -4,6 +4,7 @@ using System.Linq; using Moq; using NFluent; using WireMock.Matchers.Request; +using WireMock.Models; using Xunit; namespace WireMock.Net.Tests.RequestMatchers @@ -21,7 +22,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageCompositeMatcher_GetMatchingScore_EmptyArray() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new Helper(Enumerable.Empty()); // Act @@ -41,7 +42,7 @@ namespace WireMock.Net.Tests.RequestMatchers var requestMatcher2Mock = new Mock(); requestMatcher2Mock.Setup(rm => rm.GetMatchingScore(It.IsAny(), It.IsAny())).Returns(0.8d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new Helper(new[] { requestMatcher1Mock.Object, requestMatcher2Mock.Object }); // Act @@ -65,7 +66,7 @@ namespace WireMock.Net.Tests.RequestMatchers var requestMatcher2Mock = new Mock(); requestMatcher2Mock.Setup(rm => rm.GetMatchingScore(It.IsAny(), It.IsAny())).Returns(0.8d); - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new Helper(new[] { requestMatcher1Mock.Object, requestMatcher2Mock.Object }, CompositeMatcherType.Or); // Act diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs index c955c29b..b70914d9 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageCookieMatcherTests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using Xunit; namespace WireMock.Net.Tests.RequestMatchers @@ -13,7 +14,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageCookieMatcher_GetMatchingScore_AcceptOnMatch_CookieDoesNotExists() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new RequestMessageCookieMatcher(MatchBehaviour.AcceptOnMatch, "c", "x"); // Act @@ -28,7 +29,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageCookieMatcher_GetMatchingScore_RejectOnMatch_CookieDoesNotExists() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new RequestMessageCookieMatcher(MatchBehaviour.RejectOnMatch, "c", "x"); // Act @@ -44,7 +45,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var cookies = new Dictionary { { "c", "x" } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, null, cookies); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, null, cookies); var matcher = new RequestMessageCookieMatcher(MatchBehaviour.AcceptOnMatch, "no-match", "123"); // Act @@ -59,7 +60,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var cookies = new Dictionary { { "h", "x" } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, null, cookies); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, null, cookies); var matcher = new RequestMessageCookieMatcher(MatchBehaviour.RejectOnMatch, "no-match", "123"); // Act @@ -75,7 +76,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var cookies = new Dictionary { { "h", "x" } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, null, cookies); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, null, cookies); var matcher = new RequestMessageCookieMatcher(MatchBehaviour.AcceptOnMatch, "h", "x"); // Act @@ -91,7 +92,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var cookies = new Dictionary { { "h", "x" } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, null, cookies); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, null, cookies); var matcher = new RequestMessageCookieMatcher(MatchBehaviour.RejectOnMatch, "h", "x"); // Act @@ -107,7 +108,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var cookies = new Dictionary { { "cook", "x" } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, null, cookies); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, null, cookies); var matcher = new RequestMessageCookieMatcher("cook", new ExactMatcher("x")); // Act @@ -123,7 +124,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var cookies = new Dictionary { { "cook", "x" } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, null, cookies); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, null, cookies); var matcher = new RequestMessageCookieMatcher(x => x.ContainsKey("cook")); // Act diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs index d0804830..902167be 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageHeaderMatcherTests.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using Xunit; namespace WireMock.Net.Tests.RequestMatchers @@ -13,7 +14,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageHeaderMatcher_GetMatchingScore_AcceptOnMatch_HeaderDoesNotExists() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.AcceptOnMatch, "h", "x", true); // Act @@ -28,7 +29,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageHeaderMatcher_GetMatchingScore_RejectOnMatch_HeaderDoesNotExists() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1"); var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.RejectOnMatch, "h", "x", true); // Act @@ -44,7 +45,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var headers = new Dictionary { { "h", new[] { "x" } } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, headers); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers); var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.AcceptOnMatch, "no-match", "123", true); // Act @@ -59,7 +60,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var headers = new Dictionary { { "h", new[] { "x" } } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, headers); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers); var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.RejectOnMatch, "no-match", "123", true); // Act @@ -75,7 +76,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var headers = new Dictionary { { "h", new[] { "x" } } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, headers); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers); var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.AcceptOnMatch, "h", "x", true); // Act @@ -91,7 +92,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var headers = new Dictionary { { "h", new[] { "x" } } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, headers); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers); var matcher = new RequestMessageHeaderMatcher(MatchBehaviour.RejectOnMatch, "h", "x", true); // Act @@ -107,7 +108,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var headers = new Dictionary { { "h", new[] { "x" } } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, headers); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers); var matcher = new RequestMessageHeaderMatcher("h", new ExactMatcher("x")); // Act @@ -123,7 +124,7 @@ namespace WireMock.Net.Tests.RequestMatchers { // Assign var headers = new Dictionary { { "h", new[] { "x" } } }; - var requestMessage = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.1", null, headers); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.1", null, headers); var matcher = new RequestMessageHeaderMatcher(x => x.ContainsKey("h")); // Act diff --git a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs index e464bc8b..04bbf042 100644 --- a/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs +++ b/test/WireMock.Net.Tests/RequestMatchers/RequestMessageParamMatcherTests.cs @@ -2,6 +2,7 @@ using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using Xunit; namespace WireMock.Net.Tests.RequestMatchers @@ -12,7 +13,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_KeyWithValuesPresentInUrl_MatchExactOnStringValues() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key=test1,test2"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key=test1,test2"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key", new[] { "test1", "test2" }); // Act @@ -27,7 +28,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_KeyWithValuesPresentInUrl_MatchExactOnExactMatchers() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key=test1,test2"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key=test1,test2"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key", new IStringMatcher[] { new ExactMatcher("test1"), new ExactMatcher("test2") }); // Act @@ -42,7 +43,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_KeyWithValuesPresentInUrl_MatchOnKeyWithValues_PartialMatch() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key=test0,test2"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key=test0,test2"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key", new[] { "test1", "test2" }); // Act @@ -57,7 +58,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_OnlyKeyPresentInUrl_MatchOnKeyWithValues_Fails() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key", new[] { "test1", "test2" }); // Act @@ -72,7 +73,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_OnlyKeyPresentInUrl_MatchOnKey() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key"); // Act @@ -87,7 +88,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_OnlyKeyPresentInUrl_MatchOnKeyWithEmptyArray() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key", new string[] { }); // Act @@ -102,7 +103,7 @@ namespace WireMock.Net.Tests.RequestMatchers public void RequestMessageParamMatcher_GetMatchingScore_KeyWithValuePresentInUrl_MatchOnKey() { // Assign - var requestMessage = new RequestMessage(new Uri("http://localhost?key=frank@contoso.com"), "GET", "127.0.0.1"); + var requestMessage = new RequestMessage(new UrlDetails("http://localhost?key=frank@contoso.com"), "GET", "127.0.0.1"); var matcher = new RequestMessageParamMatcher(MatchBehaviour.AcceptOnMatch, "key"); // Act diff --git a/test/WireMock.Net.Tests/RequestMessageTests.cs b/test/WireMock.Net.Tests/RequestMessageTests.cs index 1db6b44e..7c60d1ae 100644 --- a/test/WireMock.Net.Tests/RequestMessageTests.cs +++ b/test/WireMock.Net.Tests/RequestMessageTests.cs @@ -1,5 +1,6 @@ using System; using NFluent; +using WireMock.Models; using WireMock.Util; using Xunit; @@ -13,7 +14,7 @@ namespace WireMock.Net.Tests public void RequestMessage_ParseQuery_NoKeys() { // given - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp); // then Check.That(request.GetParameter("not_there")).IsNull(); @@ -23,7 +24,7 @@ namespace WireMock.Net.Tests public void RequestMessage_ParseQuery_SingleKey_SingleValue() { // Assign - var request = new RequestMessage(new Uri("http://localhost?foo=bar"), "POST", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost?foo=bar"), "POST", ClientIp); // Assert Check.That(request.GetParameter("foo")).ContainsExactly("bar"); @@ -33,7 +34,7 @@ namespace WireMock.Net.Tests public void RequestMessage_ParseQuery_MultipleKeys_MultipleValues() { // Assign - var request = new RequestMessage(new Uri("http://localhost?key=1&key=2"), "POST", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost?key=1&key=2"), "POST", ClientIp); // Assert Check.That(request.GetParameter("key")).Contains("1"); @@ -44,7 +45,7 @@ namespace WireMock.Net.Tests public void RequestMessage_ParseQuery_SingleKey_MultipleValues() { // Assign - var request = new RequestMessage(new Uri("http://localhost?key=1,2&foo=bar&key=3"), "POST", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost?key=1,2&foo=bar&key=3"), "POST", ClientIp); // Assert Check.That(request.GetParameter("key")).Contains("1"); @@ -56,7 +57,7 @@ namespace WireMock.Net.Tests public void RequestMessage_Constructor1_PathSegments() { // Assign - var request = new RequestMessage(new Uri("http://localhost/a/b/c"), "POST", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/a/b/c"), "POST", ClientIp); // Assert Check.That(request.PathSegments).ContainsExactly("a", "b", "c"); @@ -66,7 +67,7 @@ namespace WireMock.Net.Tests public void RequestMessage_Constructor2_PathSegments() { // Assign - var request = new RequestMessage(new Uri("http://localhost/a/b/c"), "POST", ClientIp, new BodyData()); + var request = new RequestMessage(new UrlDetails("http://localhost/a/b/c"), "POST", ClientIp, new BodyData()); // Assert Check.That(request.PathSegments).ContainsExactly("a", "b", "c"); diff --git a/test/WireMock.Net.Tests/RequestTests.cs b/test/WireMock.Net.Tests/RequestTests.cs index 07457870..e8efd974 100644 --- a/test/WireMock.Net.Tests/RequestTests.cs +++ b/test/WireMock.Net.Tests/RequestTests.cs @@ -5,6 +5,7 @@ using NFluent; using Xunit; using WireMock.RequestBuilders; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.Util; namespace WireMock.Net.Tests @@ -20,7 +21,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/bar").UsingPut(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -38,7 +39,7 @@ namespace WireMock.Net.Tests { BodyAsString = "whatever" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "tata" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "tata" } } }); // then var requestMatchResult = new RequestMatchResult(); @@ -56,7 +57,7 @@ namespace WireMock.Net.Tests { BodyAsString = "whatever" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "ABC" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "ABC" } } }); // then var requestMatchResult = new RequestMatchResult(); @@ -74,7 +75,7 @@ namespace WireMock.Net.Tests { BodyAsString = "whatever" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "TaTa" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "TaTa" } } }); // then var requestMatchResult = new RequestMatchResult(); @@ -92,7 +93,7 @@ namespace WireMock.Net.Tests { BodyAsString = "Hello world!" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -110,7 +111,7 @@ namespace WireMock.Net.Tests { BodyAsString = "xxx" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "tata" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "tata" } } }); // then var requestMatchResult = new RequestMatchResult(); @@ -124,7 +125,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithParam("bar", "1", "2"); // when - var request = new RequestMessage(new Uri("http://localhost/foo?bar=1&bar=2"), "PUT", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo?bar=1&bar=2"), "PUT", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -138,7 +139,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().UsingAnyMethod().WithParam(p => p.ContainsKey("bar")); // when - var request = new RequestMessage(new Uri("http://localhost/foo?bar=1&bar=2"), "PUT", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo?bar=1&bar=2"), "PUT", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -152,7 +153,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithParam("bar", "1"); // when - var request = new RequestMessage(new Uri("http://localhost/test=7"), "PUT", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/test=7"), "PUT", ClientIp); // then var requestMatchResult = new RequestMatchResult(); diff --git a/test/WireMock.Net.Tests/RequestWithBodyTests.cs b/test/WireMock.Net.Tests/RequestWithBodyTests.cs index 2bab6cca..8b1f47d6 100644 --- a/test/WireMock.Net.Tests/RequestWithBodyTests.cs +++ b/test/WireMock.Net.Tests/RequestWithBodyTests.cs @@ -4,6 +4,7 @@ using Newtonsoft.Json; using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.RequestBuilders; using WireMock.Util; using Xunit; @@ -25,7 +26,7 @@ namespace WireMock.Net.Tests { BodyAsString = "b" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); // Assert var requestMatchResult = new RequestMatchResult(); @@ -43,7 +44,7 @@ namespace WireMock.Net.Tests { BodyAsJson = 123 }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); // Assert var requestMatchResult = new RequestMatchResult(); @@ -61,7 +62,7 @@ namespace WireMock.Net.Tests { BodyAsBytes = new byte[0] }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); // Assert var requestMatchResult = new RequestMatchResult(); @@ -79,7 +80,7 @@ namespace WireMock.Net.Tests { BodyAsString = "cat" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -97,7 +98,7 @@ namespace WireMock.Net.Tests { BodyAsString = "Hello world!" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -120,7 +121,7 @@ namespace WireMock.Net.Tests xyz " }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -143,7 +144,7 @@ namespace WireMock.Net.Tests xyz " }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -161,7 +162,7 @@ namespace WireMock.Net.Tests { BodyAsString = "{ \"things\": [ { \"name\": \"RequiredThing\" }, { \"name\": \"Wiremock\" } ] }" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -179,7 +180,7 @@ namespace WireMock.Net.Tests { BodyAsString = "{ \"things\": { \"name\": \"Wiremock\" } }" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -201,7 +202,7 @@ namespace WireMock.Net.Tests Encoding = Encoding.UTF8 }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, bodyData); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, bodyData); // then var requestMatchResult = new RequestMatchResult(); @@ -223,7 +224,7 @@ namespace WireMock.Net.Tests Encoding = Encoding.UTF8 }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, bodyData); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, bodyData); // then var requestMatchResult = new RequestMatchResult(); @@ -245,7 +246,7 @@ namespace WireMock.Net.Tests Encoding = Encoding.UTF8 }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, bodyData); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, bodyData); // then var requestMatchResult = new RequestMatchResult(); @@ -266,7 +267,7 @@ namespace WireMock.Net.Tests }; // Act - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, bodyData); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, bodyData); // Assert var requestMatchResult = new RequestMatchResult(); @@ -286,7 +287,7 @@ namespace WireMock.Net.Tests }; // Act - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, bodyData); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, bodyData); // Assert var requestMatchResult = new RequestMatchResult(); diff --git a/test/WireMock.Net.Tests/RequestWithClientIPTests.cs b/test/WireMock.Net.Tests/RequestWithClientIPTests.cs index 4a73fe60..cbee8c84 100644 --- a/test/WireMock.Net.Tests/RequestWithClientIPTests.cs +++ b/test/WireMock.Net.Tests/RequestWithClientIPTests.cs @@ -2,6 +2,7 @@ using System; using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.RequestBuilders; using Xunit; @@ -16,7 +17,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithClientIP("127.0.0.2", "1.1.1.1"); // when - var request = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.2"); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.2"); // then var requestMatchResult = new RequestMatchResult(); @@ -30,7 +31,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithClientIP("127.0.0.2"); // when - var request = new RequestMessage(new Uri("http://localhost"), "GET", "192.1.1.1"); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", "192.1.1.1"); // then var requestMatchResult = new RequestMatchResult(); @@ -44,7 +45,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithClientIP(new WildcardMatcher("127.0.0.2")); // when - var request = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.2"); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.2"); // then var requestMatchResult = new RequestMatchResult(); @@ -58,7 +59,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithClientIP(c => c.Contains(".")); // when - var request = new RequestMessage(new Uri("http://localhost"), "GET", "127.0.0.2"); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", "127.0.0.2"); // then var requestMatchResult = new RequestMatchResult(); diff --git a/test/WireMock.Net.Tests/RequestWithPathTests.cs b/test/WireMock.Net.Tests/RequestWithPathTests.cs index d75edeb3..3f9d5b5d 100644 --- a/test/WireMock.Net.Tests/RequestWithPathTests.cs +++ b/test/WireMock.Net.Tests/RequestWithPathTests.cs @@ -5,6 +5,7 @@ using WireMock.Matchers; using Xunit; using WireMock.RequestBuilders; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.Util; namespace WireMock.Net.Tests @@ -24,7 +25,7 @@ namespace WireMock.Net.Tests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "tata" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp, body, new Dictionary { { "X-toto", new[] { "tata" } } }); // then var requestMatchResult = new RequestMatchResult(); @@ -38,7 +39,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo"); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -50,8 +51,8 @@ namespace WireMock.Net.Tests { var requestBuilder = Request.Create().WithPath("/x1", "/x2"); - var request1 = new RequestMessage(new Uri("http://localhost/x1"), "blabla", ClientIp); - var request2 = new RequestMessage(new Uri("http://localhost/x2"), "blabla", ClientIp); + var request1 = new RequestMessage(new UrlDetails("http://localhost/x1"), "blabla", ClientIp); + var request2 = new RequestMessage(new UrlDetails("http://localhost/x2"), "blabla", ClientIp); var requestMatchResult = new RequestMatchResult(); Check.That(requestBuilder.GetMatchingScore(request1, requestMatchResult)).IsEqualTo(1.0); @@ -65,7 +66,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath(url => url.EndsWith("/foo")); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -79,7 +80,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath(new RegexMatcher("^/foo")); // when - var request = new RequestMessage(new Uri("http://localhost/foo/bar"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo/bar"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -93,7 +94,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo"); // when - var request = new RequestMessage(new Uri("http://localhost/bar"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/bar"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -111,7 +112,7 @@ namespace WireMock.Net.Tests { BodyAsString = "whatever" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "Delete", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "Delete", ClientIp, body); // then var requestMatchResult = new RequestMatchResult(); @@ -125,7 +126,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo").UsingGet(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "GET", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -139,7 +140,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo").UsingHead(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "HEAD", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "HEAD", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -153,7 +154,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo").UsingPost(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -167,7 +168,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo").UsingPut(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -181,7 +182,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo").UsingPatch(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "PATCH", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "PATCH", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -195,7 +196,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithPath("/foo").UsingPut(); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "HEAD", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "HEAD", ClientIp); // then var requestMatchResult = new RequestMatchResult(); diff --git a/test/WireMock.Net.Tests/RequestWithUrlTests.cs b/test/WireMock.Net.Tests/RequestWithUrlTests.cs index cad2210f..b66e18ae 100644 --- a/test/WireMock.Net.Tests/RequestWithUrlTests.cs +++ b/test/WireMock.Net.Tests/RequestWithUrlTests.cs @@ -2,6 +2,7 @@ using NFluent; using WireMock.Matchers; using WireMock.Matchers.Request; +using WireMock.Models; using WireMock.RequestBuilders; using Xunit; @@ -18,7 +19,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithUrl("*/foo"); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -32,7 +33,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithUrl(new WildcardMatcher("*/foo")); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); @@ -46,7 +47,7 @@ namespace WireMock.Net.Tests var spec = Request.Create().WithUrl(url => url.Contains("foo")); // when - var request = new RequestMessage(new Uri("http://localhost/foo"), "blabla", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "blabla", ClientIp); // then var requestMatchResult = new RequestMatchResult(); diff --git a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseCreateTests.cs b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseCreateTests.cs index 14f26550..2842662b 100644 --- a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseCreateTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseCreateTests.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using NFluent; +using WireMock.Models; using WireMock.ResponseBuilders; using Xunit; @@ -15,7 +16,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { // Assign var responseMessage = new ResponseMessage { StatusCode = 500 }; - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var response = Response.Create(() => responseMessage); diff --git a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyTests.cs b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyTests.cs index cdcfe22d..0d22dac6 100644 --- a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyTests.cs @@ -2,6 +2,7 @@ using System.Text; using System.Threading.Tasks; using NFluent; +using WireMock.Models; using WireMock.ResponseBuilders; using WireMock.Util; using Xunit; @@ -20,7 +21,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); var response = Response.Create().WithBody(new byte[] { 48, 49 }, BodyDestinationFormat.String, Encoding.ASCII); @@ -41,7 +42,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); var response = Response.Create().WithBody(new byte[] { 48, 49 }, BodyDestinationFormat.SameAsSource, Encoding.ASCII); @@ -62,7 +63,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); var response = Response.Create().WithBody("test", null, Encoding.ASCII); @@ -82,7 +83,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); object x = new { value = "test" }; var response = Response.Create().WithBodyAsJson(x, Encoding.ASCII); @@ -100,7 +101,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests public async Task Response_ProvideResponse_WithBody_String_SameAsSource_Encoding() { // Assign - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var response = Response.Create().WithBody("r", BodyDestinationFormat.SameAsSource, Encoding.ASCII); @@ -118,7 +119,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests public async Task Response_ProvideResponse_WithBody_String_Bytes_Encoding() { // Assign - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var response = Response.Create().WithBody("r", BodyDestinationFormat.Bytes, Encoding.ASCII); @@ -136,7 +137,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests public async Task Response_ProvideResponse_WithBody_String_Json_Encoding() { // Assign - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var response = Response.Create().WithBody("{ \"value\": 42 }", BodyDestinationFormat.Json, Encoding.ASCII); diff --git a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyHandlebarsTests.cs b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHandlebarsTests.cs similarity index 65% rename from test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyHandlebarsTests.cs rename to test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHandlebarsTests.cs index a76dbb3d..00d8988a 100644 --- a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithBodyHandlebarsTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHandlebarsTests.cs @@ -2,15 +2,17 @@ using System.Collections.Generic; using System.Text; using System.Threading.Tasks; +using Microsoft.Owin; using Newtonsoft.Json; using NFluent; +using WireMock.Models; using WireMock.ResponseBuilders; using WireMock.Util; using Xunit; namespace WireMock.Net.Tests.ResponseBuilderTests { - public class ResponseWithBodyHandlebarsTests + public class ResponseWithHandlebarsTests { private const string ClientIp = "::1"; @@ -24,7 +26,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests BodyAsJson = JsonConvert.DeserializeObject(jsonString), Encoding = Encoding.UTF8 }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, bodyData); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, bodyData); var response = Response.Create() .WithBodyAsJson(new { x = "test {{request.url}}" }) @@ -45,7 +47,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "whatever" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body); var response = Response.Create() .WithBody("test {{request.url}} {{request.path}} {{request.method}}") @@ -58,6 +60,42 @@ namespace WireMock.Net.Tests.ResponseBuilderTests Check.That(responseMessage.Body).Equals("test http://localhost/foo /foo post"); } + [Fact] + public async Task Response_ProvideResponse_Handlebars_UrlPath() + { + // given + var urlDetails = UrlUtils.Parse(new Uri("http://localhost/wiremock/a/b"), new PathString("/wiremock")); + var request = new RequestMessage(urlDetails, "POST", ClientIp); + + var response = Response.Create() + .WithBody("{{request.url}} {{request.absoluteurl}} {{request.path}} {{request.absolutepath}}") + .WithTransformer(); + + // act + var responseMessage = await response.ProvideResponseAsync(request); + + // then + Check.That(responseMessage.Body).Equals("http://localhost/a/b http://localhost/wiremock/a/b /a/b /wiremock/a/b"); + } + + [Fact] + public async Task Response_ProvideResponse_Handlebars_PathSegments() + { + // given + var urlDetails = UrlUtils.Parse(new Uri("http://localhost/wiremock/a/b"), new PathString("/wiremock")); + var request = new RequestMessage(urlDetails, "POST", ClientIp); + + var response = Response.Create() + .WithBody("{{request.pathsegments.[0]}} {{request.absolutepathsegments.[0]}}") + .WithTransformer(); + + // act + var responseMessage = await response.ProvideResponseAsync(request); + + // then + Check.That(responseMessage.Body).Equals("a wiremock"); + } + [Fact] public async Task Response_ProvideResponse_Handlebars_Query() { @@ -66,7 +104,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo?a=1&a=2&b=5"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost/foo?a=1&a=2&b=5"), "POST", ClientIp, body); var response = Response.Create() .WithBody("test keya={{request.query.a}} idx={{request.query.a.[0]}} idx={{request.query.a.[1]}} keyb={{request.query.b}}") @@ -87,7 +125,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body, new Dictionary { { "Content-Type", new[] { "text/plain" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body, new Dictionary { { "Content-Type", new[] { "text/plain" } } }); var response = Response.Create().WithHeader("x", "{{request.headers.Content-Type}}").WithBody("test").WithTransformer(); @@ -108,7 +146,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost/foo"), "POST", ClientIp, body, new Dictionary { { "Content-Type", new[] { "text/plain" } } }); + var request = new RequestMessage(new UrlDetails("http://localhost/foo"), "POST", ClientIp, body, new Dictionary { { "Content-Type", new[] { "text/plain" } } }); var response = Response.Create().WithHeader("x", "{{request.headers.Content-Type}}", "{{request.url}}").WithBody("test").WithTransformer(); @@ -130,7 +168,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests { BodyAsString = "abc" }; - var request = new RequestMessage(new Uri("http://localhost:1234"), "POST", ClientIp, body); + var request = new RequestMessage(new UrlDetails("http://localhost:1234"), "POST", ClientIp, body); var response = Response.Create() .WithBody("test {{request.origin}} {{request.port}} {{request.protocol}} {{request.host}}") diff --git a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHeadersTests.cs b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHeadersTests.cs index 2c353185..1d13d900 100644 --- a/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHeadersTests.cs +++ b/test/WireMock.Net.Tests/ResponseBuilderTests/ResponseWithHeadersTests.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using NFluent; +using WireMock.Models; using WireMock.ResponseBuilders; using WireMock.Util; using Xunit; @@ -16,7 +17,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests public async Task Response_ProvideResponse_WithHeaders_SingleValue() { // Assign - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var headers = new Dictionary { { "h", "x" } }; var response = Response.Create().WithHeaders(headers); @@ -31,7 +32,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests public async Task Response_ProvideResponse_WithHeaders_MultipleValues() { // Assign - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var headers = new Dictionary { { "h", new[] { "x" } } }; var response = Response.Create().WithHeaders(headers); @@ -46,7 +47,7 @@ namespace WireMock.Net.Tests.ResponseBuilderTests public async Task Response_ProvideResponse_WithHeaders_WiremockList() { // Assign - var request = new RequestMessage(new Uri("http://localhost"), "GET", ClientIp); + var request = new RequestMessage(new UrlDetails("http://localhost"), "GET", ClientIp); var headers = new Dictionary> { { "h", new WireMockList("x") } }; var response = Response.Create().WithHeaders(headers); diff --git a/test/WireMock.Net.Tests/ResponseTests.cs b/test/WireMock.Net.Tests/ResponseTests.cs index fad94de3..9b8f2872 100644 --- a/test/WireMock.Net.Tests/ResponseTests.cs +++ b/test/WireMock.Net.Tests/ResponseTests.cs @@ -1,5 +1,6 @@ using System; using NFluent; +using WireMock.Models; using WireMock.ResponseBuilders; using Xunit; @@ -16,7 +17,7 @@ namespace WireMock.Net.Tests public async void Response_Create_WithHeader(string headerName, string headerValue) { // Assign - var requestMock = new RequestMessage(new Uri("http://localhost/foo"), "PUT", ClientIp); + var requestMock = new RequestMessage(new UrlDetails("http://localhost/foo"), "PUT", ClientIp); IResponseBuilder builder = Response.Create().WithHeader(headerName, headerValue); // Act diff --git a/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs b/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs new file mode 100644 index 00000000..c6245d09 --- /dev/null +++ b/test/WireMock.Net.Tests/Util/UrlUtilsTests.cs @@ -0,0 +1,53 @@ +using System; +using Microsoft.Owin; +using NFluent; +using WireMock.Util; +using Xunit; + +namespace WireMock.Net.Tests.Util +{ + public class UrlUtilsTests + { + [Fact] + public void UriUtils_CreateUri_WithValidPathString() + { + // Assign + Uri uri = new Uri("https://localhost:1234/a/b?x=0"); + + // Act + var result = UrlUtils.Parse(uri, new PathString("/a")); + + // Assert + Check.That(result.Url.ToString()).Equals("https://localhost:1234/b?x=0"); + Check.That(result.AbsoluteUrl.ToString()).Equals("https://localhost:1234/a/b?x=0"); + } + + [Fact] + public void UriUtils_CreateUri_WithEmptyPathString() + { + // Assign + Uri uri = new Uri("https://localhost:1234/a/b?x=0"); + + // Act + var result = UrlUtils.Parse(uri, new PathString()); + + // Assert + Check.That(result.Url.ToString()).Equals("https://localhost:1234/a/b?x=0"); + Check.That(result.AbsoluteUrl.ToString()).Equals("https://localhost:1234/a/b?x=0"); + } + + [Fact] + public void UriUtils_CreateUri_WithDifferentPathString() + { + // Assign + Uri uri = new Uri("https://localhost:1234/a/b?x=0"); + + // Act + var result = UrlUtils.Parse(uri, new PathString("/test")); + + // Assert + Check.That(result.Url.ToString()).Equals("https://localhost:1234/a/b?x=0"); + Check.That(result.AbsoluteUrl.ToString()).Equals("https://localhost:1234/a/b?x=0"); + } + } +}