mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-11 21:05:18 +01:00
Compare commits
82 Commits
1.0.32.0
...
WireMockSe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e6eb256f5 | ||
|
|
2851c820e0 | ||
|
|
13ab37dd3e | ||
|
|
f49046374a | ||
|
|
69488ced5f | ||
|
|
e6bcd625f7 | ||
|
|
d1b42bf436 | ||
|
|
f4861d9bab | ||
|
|
4c01ef4838 | ||
|
|
83866f5719 | ||
|
|
f72c3c33ef | ||
|
|
32248b6585 | ||
|
|
1df4502631 | ||
|
|
5e76a82a21 | ||
|
|
06ae9d72c3 | ||
|
|
307a89d324 | ||
|
|
6ae7fc1d75 | ||
|
|
29e86abe12 | ||
|
|
710fc8dcf6 | ||
|
|
dfbfa5fd35 | ||
|
|
69bbd76ca4 | ||
|
|
bd0c5a83c9 | ||
|
|
a08efe2f78 | ||
|
|
6e151098e5 | ||
|
|
43d481435c | ||
|
|
ea1be6641a | ||
|
|
93613885c1 | ||
|
|
caee5895eb | ||
|
|
101d755a00 | ||
|
|
368fdd4c7d | ||
|
|
3f802c3948 | ||
|
|
d971144426 | ||
|
|
368f0e13ac | ||
|
|
120a808104 | ||
|
|
b5795713b1 | ||
|
|
a8c17ce311 | ||
|
|
7678e8fb70 | ||
|
|
8ae0abb023 | ||
|
|
b3c2af0c22 | ||
|
|
2dd30b4f14 | ||
|
|
45d8c0cc27 | ||
|
|
178f2cf02f | ||
|
|
1b326a54d6 | ||
|
|
8bafd6a1ba | ||
|
|
a47750c058 | ||
|
|
5bb10c3350 | ||
|
|
3a221f51b1 | ||
|
|
0ff23a3d15 | ||
|
|
9b323ab388 | ||
|
|
9b3c750754 | ||
|
|
a5d6061c2d | ||
|
|
395be3c583 | ||
|
|
ea6a8d3b73 | ||
|
|
4886ac6196 | ||
|
|
0ca63eef66 | ||
|
|
c72487a748 | ||
|
|
79db955611 | ||
|
|
395f48a2bf | ||
|
|
596177d4e5 | ||
|
|
fc024678fa | ||
|
|
2e78a04f3d | ||
|
|
f3d2452093 | ||
|
|
92e693818a | ||
|
|
9a1ae6a3f0 | ||
|
|
e701566a1f | ||
|
|
84ad5a927e | ||
|
|
3250604b5a | ||
|
|
9d2963632e | ||
|
|
9e0536c54c | ||
|
|
676e973011 | ||
|
|
31f3d77b38 | ||
|
|
4a2d512f83 | ||
|
|
87534c35f5 | ||
|
|
7789f94737 | ||
|
|
b2167f85ae | ||
|
|
3cc361e216 | ||
|
|
0a9214ef47 | ||
|
|
4afef3695b | ||
|
|
782b082949 | ||
|
|
36325fe2c7 | ||
|
|
01171b9592 | ||
|
|
d6f44b2202 |
131
CHANGELOG.md
131
CHANGELOG.md
@@ -1,19 +1,118 @@
|
|||||||
|
# 1.1.9.0 (25 February 2020)
|
||||||
|
- [#431](https://github.com/WireMock-Net/WireMock.Net/pull/431) - Fix LinqMatcher for JSON int64 [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#425](https://github.com/WireMock-Net/WireMock.Net/issues/425) - Allow 64 bit numbers in JSON [bug]
|
||||||
|
|
||||||
|
# 1.1.8.0 (22 February 2020)
|
||||||
|
- [#419](https://github.com/WireMock-Net/WireMock.Net/pull/419) - Support multi line wild card matching [bug] contributed by [NoahLerner](https://github.com/NoahLerner)
|
||||||
|
- [#421](https://github.com/WireMock-Net/WireMock.Net/pull/421) - Fix: do not return empty matchers array when Func has been used [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#423](https://github.com/WireMock-Net/WireMock.Net/pull/423) - Fixes for Cookie and Header Reject on Match [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#424](https://github.com/WireMock-Net/WireMock.Net/pull/424) - Don't return empty dictionary object for response headers in JSON mapping [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#418](https://github.com/WireMock-Net/WireMock.Net/issues/418) - Body matching fails if body has newline [bug]
|
||||||
|
|
||||||
|
# 1.1.7.0 (06 February 2020)
|
||||||
|
- [#409](https://github.com/WireMock-Net/WireMock.Net/pull/409) - Admin Delete with mappings in body [feature] contributed by [NoahLerner](https://github.com/NoahLerner)
|
||||||
|
- [#411](https://github.com/WireMock-Net/WireMock.Net/pull/411) - Improved relative path checking based on file existence [feature] contributed by [NoahLerner](https://github.com/NoahLerner)
|
||||||
|
- [#413](https://github.com/WireMock-Net/WireMock.Net/pull/413) - Fix new Delete with body missing from IWireMockAdminApi interface contributed by [NoahLerner](https://github.com/NoahLerner)
|
||||||
|
- [#414](https://github.com/WireMock-Net/WireMock.Net/pull/414) - Fix logger in StandAlone [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#412](https://github.com/WireMock-Net/WireMock.Net/issues/412) - WireMock Standalone - null reference exception since settings.Logger [bug]
|
||||||
|
|
||||||
|
# 1.1.6.0 (27 January 2020)
|
||||||
|
- [#407](https://github.com/WireMock-Net/WireMock.Net/pull/407) - AllowAnyHttpStatusCodeInResponse [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.1.5.0 (25 January 2020)
|
||||||
|
- [#405](https://github.com/WireMock-Net/WireMock.Net/pull/405) - Fix logging an Exception Message (linux docker on azure) [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#406](https://github.com/WireMock-Net/WireMock.Net/pull/406) - Fixed StatusCode = null or < 0 [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.1.3.0 (22 January 2020)
|
||||||
|
- [#403](https://github.com/WireMock-Net/WireMock.Net/pull/403) - Fix for invalid cast exception contributed by [kashifsoofi](https://github.com/kashifsoofi)
|
||||||
|
- [#402](https://github.com/WireMock-Net/WireMock.Net/issues/402) - Invalid Cast Exception [bug]
|
||||||
|
|
||||||
|
# 1.1.2.0 (09 January 2020)
|
||||||
|
- [#399](https://github.com/WireMock-Net/WireMock.Net/pull/399) - ResponseModel.StatusCode is deserialized as either string or long. [bug] contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
||||||
|
- [#400](https://github.com/WireMock-Net/WireMock.Net/issues/400) - StatusCode not built correctly when loaded from mapping file. [bug]
|
||||||
|
|
||||||
|
# 1.1.1.0 (09 January 2020)
|
||||||
|
- [#398](https://github.com/WireMock-Net/WireMock.Net/pull/398) - Feature/xpath transformer [feature] contributed by [kashifsoofi](https://github.com/kashifsoofi)
|
||||||
|
- [#397](https://github.com/WireMock-Net/WireMock.Net/issues/397) - Question/Feature: Add support for selecting XPath in response template [feature]
|
||||||
|
|
||||||
|
# 1.1.0.0 (27 December 2019)
|
||||||
|
- [#363](https://github.com/WireMock-Net/WireMock.Net/pull/363) - WireMock.Net version 1.1.x contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.0.43.0 (26 December 2019)
|
||||||
|
- [#385](https://github.com/WireMock-Net/WireMock.Net/pull/385) - StatusCode as string [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#380](https://github.com/WireMock-Net/WireMock.Net/issues/380) - StatusCode is defined as integer (string is not possible) [bug]
|
||||||
|
- [#382](https://github.com/WireMock-Net/WireMock.Net/issues/382) - Return same request body [feature]
|
||||||
|
|
||||||
|
# 1.0.42.0 (15 December 2019)
|
||||||
|
- [#391](https://github.com/WireMock-Net/WireMock.Net/pull/391) - Correctly support DateTime pattern as string in ExactMatcher [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#383](https://github.com/WireMock-Net/WireMock.Net/issues/383) - ExactMatcher does not accept ISO8601 DateTime? [bug]
|
||||||
|
|
||||||
|
# 1.0.41.0 (14 December 2019)
|
||||||
|
- [#392](https://github.com/WireMock-Net/WireMock.Net/pull/392) - Fix array in JsonMatcher [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#390](https://github.com/WireMock-Net/WireMock.Net/issues/390) - JsonMatcher does not match a body containing an array of strings [bug]
|
||||||
|
|
||||||
|
# 1.0.40.0 (09 December 2019)
|
||||||
|
- [#389](https://github.com/WireMock-Net/WireMock.Net/pull/389) - Fix QueryStringParser [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#387](https://github.com/WireMock-Net/WireMock.Net/issues/387) - Query string parameter value which contains %26 does not work with ExactMatcher [bug]
|
||||||
|
|
||||||
|
# 1.0.39.0 (07 December 2019)
|
||||||
|
- [#370](https://github.com/WireMock-Net/WireMock.Net/pull/370) - Add WebProxySettings (use when proxying requests) [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#388](https://github.com/WireMock-Net/WireMock.Net/pull/388) - Transform body as file [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#369](https://github.com/WireMock-Net/WireMock.Net/issues/369) - Question: Is there a way to provide a corporate proxy configuration? [feature]
|
||||||
|
- [#375](https://github.com/WireMock-Net/WireMock.Net/issues/375) - Proxying does not follow redirects : make this configurable [feature]
|
||||||
|
- [#386](https://github.com/WireMock-Net/WireMock.Net/issues/386) - Is transforming contents of XML file supported.? [bug]
|
||||||
|
|
||||||
|
# 1.0.38.0 (30 November 2019)
|
||||||
|
- [#376](https://github.com/WireMock-Net/WireMock.Net/pull/376) - Support int values for states and scenario naming [feature] contributed by [NoahLerner](https://github.com/NoahLerner)
|
||||||
|
- [#378](https://github.com/WireMock-Net/WireMock.Net/pull/378) - Set handlebars dependency for .net 4.5.1 to fixed value [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#381](https://github.com/WireMock-Net/WireMock.Net/pull/381) - Use dotnet default development certificate for .NET Core 2.x [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#377](https://github.com/WireMock-Net/WireMock.Net/issues/377) - Unable to build against .NET 4.5.1 because of Handlebars [bug]
|
||||||
|
|
||||||
|
# 1.0.37.0 (08 November 2019)
|
||||||
|
- [#373](https://github.com/WireMock-Net/WireMock.Net/pull/373) - Make Sonar and WhiteSource optional in the Azure pipelines build [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#374](https://github.com/WireMock-Net/WireMock.Net/pull/374) - WatchStaticMappingsInSubdirectories [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#372](https://github.com/WireMock-Net/WireMock.Net/issues/372) - Reset in WireMock admin API not working fine. [feature]
|
||||||
|
|
||||||
|
# 1.0.36.0 (26 October 2019)
|
||||||
|
- [#360](https://github.com/WireMock-Net/WireMock.Net/pull/360) - Add support for Faults [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#343](https://github.com/WireMock-Net/WireMock.Net/issues/343) - Feature: Please provide support for Bad responses. [feature]
|
||||||
|
|
||||||
|
# 1.0.35.0 (25 October 2019)
|
||||||
|
- [#367](https://github.com/WireMock-Net/WireMock.Net/pull/367) - No symbol NuGets [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#368](https://github.com/WireMock-Net/WireMock.Net/pull/368) - Remove Obsolete annotations [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
|
# 1.0.34.0 (22 October 2019)
|
||||||
|
- [#354](https://github.com/WireMock-Net/WireMock.Net/pull/354) - AllowBodyForAllHttpMethods [bug, feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#365](https://github.com/WireMock-Net/WireMock.Net/pull/365) - Bump Microsoft.AspNetCore.All from 2.0.8 to 2.0.9 in /examples/WireMock.Net.WebApplication [dependencies] contributed by [dependabot[bot]](https://github.com/apps/dependabot)
|
||||||
|
- [#366](https://github.com/WireMock-Net/WireMock.Net/pull/366) - Update ObsoleteAnnotations [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#352](https://github.com/WireMock-Net/WireMock.Net/issues/352) - DELETE request drops the body [feature]
|
||||||
|
|
||||||
|
# 1.0.33.0 (12 October 2019)
|
||||||
|
- [#311](https://github.com/WireMock-Net/WireMock.Net/pull/311) - fix jsonpath matcher [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#324](https://github.com/WireMock-Net/WireMock.Net/pull/324) - Add CSharpCodeMatcher [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#353](https://github.com/WireMock-Net/WireMock.Net/pull/353) - Fixed failing admin requests when content type includes a charset (based on idea from Paul Roub) [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#355](https://github.com/WireMock-Net/WireMock.Net/pull/355) - Add Try-Catch to the event LogEntriesChanged [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#357](https://github.com/WireMock-Net/WireMock.Net/pull/357) - Add Proxy Setting for: SaveMappingForStatusCodePattern to only save the mapping when the status code matches the pattern [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#358](https://github.com/WireMock-Net/WireMock.Net/pull/358) - Fix JsonMatcher (parsing DateTimeOffset) contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#306](https://github.com/WireMock-Net/WireMock.Net/issues/306) - Writing to the response body is invalid for responses with status code 204 [bug]
|
||||||
|
- [#307](https://github.com/WireMock-Net/WireMock.Net/issues/307) - JsonPathMatcher always convert to JArray before matching [bug]
|
||||||
|
- [#329](https://github.com/WireMock-Net/WireMock.Net/issues/329) - Feature: Add support for CSharpCodeMatcher [feature]
|
||||||
|
- [#350](https://github.com/WireMock-Net/WireMock.Net/issues/350) - Admin requests fail when content type includes a charset [bug]
|
||||||
|
- [#356](https://github.com/WireMock-Net/WireMock.Net/issues/356) - JsonMatcher not working when JSON contains a DateTimeOffset [bug]
|
||||||
|
|
||||||
# 1.0.32.0 (20 September 2019)
|
# 1.0.32.0 (20 September 2019)
|
||||||
- [#348](https://github.com/WireMock-Net/WireMock.Net/pull/348) - When posting new mapping, use DateParseHandling.None [bug] contributed by [StefH](https://github.com/StefH)
|
- [#348](https://github.com/WireMock-Net/WireMock.Net/pull/348) - When posting new mapping, use DateParseHandling.None [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#347](https://github.com/WireMock-Net/WireMock.Net/issues/347) - Query string match on DateTimeOffset is not working [bug]
|
- [#347](https://github.com/WireMock-Net/WireMock.Net/issues/347) - Query string match on DateTimeOffset is not working [bug]
|
||||||
|
|
||||||
# 1.0.31.0 (19 September 2019)
|
# 1.0.31.0 (19 September 2019)
|
||||||
- [#334](https://github.com/WireMock-Net/WireMock.Net/pull/334) - Fix issues with Proxy mode and Binary Request Bodies [bug] contributed by [andi0b](https://github.com/andi0b)
|
- [#334](https://github.com/WireMock-Net/WireMock.Net/pull/334) - Fix issues with Proxy mode and Binary Request Bodies [bug] contributed by [andi0b](https://github.com/andi0b)
|
||||||
|
- [#338](https://github.com/WireMock-Net/WireMock.Net/pull/338) - Fix ContentType with parameters in Proxy Mode [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#339](https://github.com/WireMock-Net/WireMock.Net/pull/339) - Fix ConcurrentObservableCollection [bug] contributed by [StefH](https://github.com/StefH)
|
- [#339](https://github.com/WireMock-Net/WireMock.Net/pull/339) - Fix ConcurrentObservableCollection [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#345](https://github.com/WireMock-Net/WireMock.Net/pull/345) - Fix CompareTo in RequestMatchResult [bug] contributed by [StefH](https://github.com/StefH)
|
- [#345](https://github.com/WireMock-Net/WireMock.Net/pull/345) - Fix CompareTo in RequestMatchResult [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#346](https://github.com/WireMock-Net/WireMock.Net/pull/346) - Fix recorded requests skipped by request logger contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
- [#346](https://github.com/WireMock-Net/WireMock.Net/pull/346) - Fix recorded requests skipped by request logger contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
||||||
- [#327](https://github.com/WireMock-Net/WireMock.Net/issues/327) - Index must be within the bounds of the List - Bug [bug]
|
|
||||||
- [#337](https://github.com/WireMock-Net/WireMock.Net/issues/337) - Proxy Missing header Content-Type - tried with Recording [bug]
|
- [#337](https://github.com/WireMock-Net/WireMock.Net/issues/337) - Proxy Missing header Content-Type - tried with Recording [bug]
|
||||||
- [#344](https://github.com/WireMock-Net/WireMock.Net/issues/344) - Mapping adding order matters for multiple mappings? [bug]
|
- [#344](https://github.com/WireMock-Net/WireMock.Net/issues/344) - Mapping adding order matters for multiple mappings? [bug]
|
||||||
|
|
||||||
# 1.0.30.0 (31 August 2019)
|
|
||||||
- [#338](https://github.com/WireMock-Net/WireMock.Net/pull/338) - Fix ContentType with parameters in Proxy Mode [bug] contributed by [StefH](https://github.com/StefH)
|
|
||||||
|
|
||||||
# 1.0.29.0 (29 August 2019)
|
# 1.0.29.0 (29 August 2019)
|
||||||
- [#328](https://github.com/WireMock-Net/WireMock.Net/pull/328) - Fix LogRequest : Index Out Of Bounds [bug] contributed by [StefH](https://github.com/StefH)
|
- [#328](https://github.com/WireMock-Net/WireMock.Net/pull/328) - Fix LogRequest : Index Out Of Bounds [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#331](https://github.com/WireMock-Net/WireMock.Net/pull/331) - Fix: Collection was modified exception [bug] contributed by [theramis](https://github.com/theramis)
|
- [#331](https://github.com/WireMock-Net/WireMock.Net/pull/331) - Fix: Collection was modified exception [bug] contributed by [theramis](https://github.com/theramis)
|
||||||
@@ -21,33 +120,24 @@
|
|||||||
- [#332](https://github.com/WireMock-Net/WireMock.Net/issues/332) - Case sensitive true is ignored for JsonMatcher [feature]
|
- [#332](https://github.com/WireMock-Net/WireMock.Net/issues/332) - Case sensitive true is ignored for JsonMatcher [feature]
|
||||||
|
|
||||||
# 1.0.28.0 (20 August 2019)
|
# 1.0.28.0 (20 August 2019)
|
||||||
|
- [#309](https://github.com/WireMock-Net/WireMock.Net/pull/309) - Fix LogEntries: collection was modified exception [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#314](https://github.com/WireMock-Net/WireMock.Net/pull/314) - RequestLogExpirationDuration : use DateTime.UtcNow [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
|
- [#316](https://github.com/WireMock-Net/WireMock.Net/pull/316) - Handles case where parameter value contains == [feature] contributed by [lobsteropteryx](https://github.com/lobsteropteryx)
|
||||||
- [#317](https://github.com/WireMock-Net/WireMock.Net/pull/317) - Make SaveMapping and SaveMappingToFile settings independent. [feature] contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
- [#317](https://github.com/WireMock-Net/WireMock.Net/pull/317) - Make SaveMapping and SaveMappingToFile settings independent. [feature] contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
||||||
- [#319](https://github.com/WireMock-Net/WireMock.Net/pull/319) - Add blacklist for Request Cookies. contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
- [#319](https://github.com/WireMock-Net/WireMock.Net/pull/319) - Add blacklist for Request Cookies. contributed by [vitaliydavydiak](https://github.com/vitaliydavydiak)
|
||||||
- [#320](https://github.com/WireMock-Net/WireMock.Net/pull/320) - Remove coverlet folder from source control [doc] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#322](https://github.com/WireMock-Net/WireMock.Net/pull/322) - Fix MappingMatcher in case of an exception in LinqMatcher. [bug] contributed by [StefH](https://github.com/StefH)
|
- [#322](https://github.com/WireMock-Net/WireMock.Net/pull/322) - Fix MappingMatcher in case of an exception in LinqMatcher. [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#323](https://github.com/WireMock-Net/WireMock.Net/pull/323) - Refactor MappingConverter & MatcherMapper [refactor] contributed by [StefH](https://github.com/StefH)
|
- [#323](https://github.com/WireMock-Net/WireMock.Net/pull/323) - Refactor MappingConverter & MatcherMapper [refactor] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#326](https://github.com/WireMock-Net/WireMock.Net/pull/326) - Fix Parsing Guid in PUT Mapping [bug] contributed by [StefH](https://github.com/StefH)
|
- [#326](https://github.com/WireMock-Net/WireMock.Net/pull/326) - Fix Parsing Guid in PUT Mapping [bug] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#318](https://github.com/WireMock-Net/WireMock.Net/issues/318) - Documentation: Add valid CLI parameters [doc, question]
|
|
||||||
- [#325](https://github.com/WireMock-Net/WireMock.Net/issues/325) - Admin API: PUT Mapping, FormatException because of wrong parsing of the Query [bug]
|
|
||||||
|
|
||||||
# 1.0.27.0 (14 August 2019)
|
|
||||||
- [#316](https://github.com/WireMock-Net/WireMock.Net/pull/316) - Handles case where parameter value contains == [feature] contributed by [lobsteropteryx](https://github.com/lobsteropteryx)
|
|
||||||
- [#287](https://github.com/WireMock-Net/WireMock.Net/issues/287) - Error with parameter that contains a "=" character [bug, question]
|
|
||||||
- [#315](https://github.com/WireMock-Net/WireMock.Net/issues/315) - Wiki - Proxying: AtPriority() example not set on right object [doc]
|
|
||||||
|
|
||||||
# 1.0.26.0 (11 August 2019)
|
|
||||||
- [#309](https://github.com/WireMock-Net/WireMock.Net/pull/309) - Fix LogEntries: collection was modified exception [bug] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#314](https://github.com/WireMock-Net/WireMock.Net/pull/314) - RequestLogExpirationDuration : use DateTime.UtcNow [bug] contributed by [StefH](https://github.com/StefH)
|
|
||||||
- [#252](https://github.com/WireMock-Net/WireMock.Net/issues/252) - Proxy with Transform
|
- [#252](https://github.com/WireMock-Net/WireMock.Net/issues/252) - Proxy with Transform
|
||||||
- [#308](https://github.com/WireMock-Net/WireMock.Net/issues/308) - __admin/requests - "Collection was modified" exception [bug]
|
- [#308](https://github.com/WireMock-Net/WireMock.Net/issues/308) - __admin/requests - "Collection was modified" exception [bug]
|
||||||
- [#313](https://github.com/WireMock-Net/WireMock.Net/issues/313) - RequestLogExpirationDuration - bug [bug]
|
- [#313](https://github.com/WireMock-Net/WireMock.Net/issues/313) - RequestLogExpirationDuration - bug [bug]
|
||||||
|
- [#325](https://github.com/WireMock-Net/WireMock.Net/issues/325) - Admin API: PUT Mapping, FormatException because of wrong parsing of the Query [bug]
|
||||||
|
|
||||||
# 1.0.25.0 (23 July 2019)
|
# 1.0.25.0 (23 July 2019)
|
||||||
- [#304](https://github.com/WireMock-Net/WireMock.Net/pull/304) - Support WithBody with multiple matchers [feature] contributed by [StefH](https://github.com/StefH)
|
- [#304](https://github.com/WireMock-Net/WireMock.Net/pull/304) - Support WithBody with multiple matchers [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
|
|
||||||
# 1.0.24.0 (22 July 2019)
|
# 1.0.24.0 (22 July 2019)
|
||||||
- [#302](https://github.com/WireMock-Net/WireMock.Net/pull/302) - Fixed bug 301 by not setting BodyAsFile to null after first use [bug] contributed by [rwwilden](https://github.com/rwwilden)
|
- [#302](https://github.com/WireMock-Net/WireMock.Net/pull/302) - Fixed bug 301 by not setting BodyAsFile to null after first use [bug] contributed by [rwwilden](https://github.com/rwwilden)
|
||||||
- [#299](https://github.com/WireMock-Net/WireMock.Net/issues/299) - Get Mappings models instead of just IMapping interface [feature, question]
|
|
||||||
- [#301](https://github.com/WireMock-Net/WireMock.Net/issues/301) - Error thrown when calling mocked endpoint second time when using file-based response body [bug]
|
- [#301](https://github.com/WireMock-Net/WireMock.Net/issues/301) - Error thrown when calling mocked endpoint second time when using file-based response body [bug]
|
||||||
|
|
||||||
# 1.0.23.0 (16 July 2019)
|
# 1.0.23.0 (16 July 2019)
|
||||||
@@ -55,15 +145,12 @@
|
|||||||
|
|
||||||
# 1.0.22.0 (15 July 2019)
|
# 1.0.22.0 (15 July 2019)
|
||||||
- [#297](https://github.com/WireMock-Net/WireMock.Net/pull/297) - FixNullRef (#295) contributed by [StefH](https://github.com/StefH)
|
- [#297](https://github.com/WireMock-Net/WireMock.Net/pull/297) - FixNullRef (#295) contributed by [StefH](https://github.com/StefH)
|
||||||
- [#178](https://github.com/WireMock-Net/WireMock.Net/issues/178) - Bug: Path matching fails when the URL contains encoded parts [bug, question]
|
|
||||||
- [#295](https://github.com/WireMock-Net/WireMock.Net/issues/295) - NullRef in 1.0.21 [bug]
|
- [#295](https://github.com/WireMock-Net/WireMock.Net/issues/295) - NullRef in 1.0.21 [bug]
|
||||||
|
|
||||||
# 1.0.21.0 (03 July 2019)
|
# 1.0.21.0 (03 July 2019)
|
||||||
- [#286](https://github.com/WireMock-Net/WireMock.Net/pull/286) - Handlebars Extension [feature] contributed by [StefH](https://github.com/StefH)
|
- [#286](https://github.com/WireMock-Net/WireMock.Net/pull/286) - Handlebars Extension [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#293](https://github.com/WireMock-Net/WireMock.Net/pull/293) - workaround for AppContext.BaseDirectory being null on some platforms contributed by [eli-darkly](https://github.com/eli-darkly)
|
- [#293](https://github.com/WireMock-Net/WireMock.Net/pull/293) - workaround for AppContext.BaseDirectory being null on some platforms contributed by [eli-darkly](https://github.com/eli-darkly)
|
||||||
- [#294](https://github.com/WireMock-Net/WireMock.Net/pull/294) - don't strip request body if we don't recognize the request method contributed by [eli-darkly](https://github.com/eli-darkly)
|
- [#294](https://github.com/WireMock-Net/WireMock.Net/pull/294) - don't strip request body if we don't recognize the request method contributed by [eli-darkly](https://github.com/eli-darkly)
|
||||||
- [#285](https://github.com/WireMock-Net/WireMock.Net/issues/285) - Need ability to add custom ResponseMessageTransformers [feature, question]
|
|
||||||
- [#288](https://github.com/WireMock-Net/WireMock.Net/issues/288) - Allow setting root folder in LocalFileSystemHandler [feature, question]
|
|
||||||
- [#289](https://github.com/WireMock-Net/WireMock.Net/issues/289) - Bug: When WatchStaticMappings=true throws exceptions on updating the mapping files [bug]
|
- [#289](https://github.com/WireMock-Net/WireMock.Net/issues/289) - Bug: When WatchStaticMappings=true throws exceptions on updating the mapping files [bug]
|
||||||
- [#290](https://github.com/WireMock-Net/WireMock.Net/issues/290) - Request body is dropped if verb is REPORT [bug]
|
- [#290](https://github.com/WireMock-Net/WireMock.Net/issues/290) - Request body is dropped if verb is REPORT [bug]
|
||||||
- [#292](https://github.com/WireMock-Net/WireMock.Net/issues/292) - Can't start server in Xamarin Android [bug]
|
- [#292](https://github.com/WireMock-Net/WireMock.Net/issues/292) - Can't start server in Xamarin Android [bug]
|
||||||
@@ -89,7 +176,6 @@
|
|||||||
- [#271](https://github.com/WireMock-Net/WireMock.Net/pull/271) - Support Dynamic response files using Handlebars templating [bug, feature] contributed by [StefH](https://github.com/StefH)
|
- [#271](https://github.com/WireMock-Net/WireMock.Net/pull/271) - Support Dynamic response files using Handlebars templating [bug, feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#272](https://github.com/WireMock-Net/WireMock.Net/pull/272) - Add unit test for JsonPath and BodyAsFile mapping contributed by [denstorti](https://github.com/denstorti)
|
- [#272](https://github.com/WireMock-Net/WireMock.Net/pull/272) - Add unit test for JsonPath and BodyAsFile mapping contributed by [denstorti](https://github.com/denstorti)
|
||||||
- [#273](https://github.com/WireMock-Net/WireMock.Net/pull/273) - Dynamic response handlebars templating (2) [bug, feature] contributed by [StefH](https://github.com/StefH)
|
- [#273](https://github.com/WireMock-Net/WireMock.Net/pull/273) - Dynamic response handlebars templating (2) [bug, feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#270](https://github.com/WireMock-Net/WireMock.Net/issues/270) - Dynamic response files using Handlebars templating [bug, question]
|
|
||||||
|
|
||||||
# 1.0.14.0 (20 April 2019)
|
# 1.0.14.0 (20 April 2019)
|
||||||
- [#269](https://github.com/WireMock-Net/WireMock.Net/pull/269) - Add JmesPath matcher [feature] contributed by [StefH](https://github.com/StefH)
|
- [#269](https://github.com/WireMock-Net/WireMock.Net/pull/269) - Add JmesPath matcher [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
@@ -120,6 +206,7 @@
|
|||||||
# 1.0.7.0 (19 January 2019)
|
# 1.0.7.0 (19 January 2019)
|
||||||
- [#244](https://github.com/WireMock-Net/WireMock.Net/pull/244) - Fix BodyAsFile to also allow relative paths [feature] contributed by [StefH](https://github.com/StefH)
|
- [#244](https://github.com/WireMock-Net/WireMock.Net/pull/244) - Fix BodyAsFile to also allow relative paths [feature] contributed by [StefH](https://github.com/StefH)
|
||||||
- [#240](https://github.com/WireMock-Net/WireMock.Net/issues/240) - How to submit mappings for multiple request, responses [feature]
|
- [#240](https://github.com/WireMock-Net/WireMock.Net/issues/240) - How to submit mappings for multiple request, responses [feature]
|
||||||
|
- [#243](https://github.com/WireMock-Net/WireMock.Net/issues/243) - Not able to read response from file [bug]
|
||||||
|
|
||||||
# 1.0.6.1 (10 January 2019)
|
# 1.0.6.1 (10 January 2019)
|
||||||
- [#247](https://github.com/WireMock-Net/WireMock.Net/pull/247) - Issue 225 improve logging in example for wire mock as windows service contributed by [paulssn](https://github.com/paulssn)
|
- [#247](https://github.com/WireMock-Net/WireMock.Net/pull/247) - Issue 225 improve logging in example for wire mock as windows service contributed by [paulssn](https://github.com/paulssn)
|
||||||
@@ -278,9 +365,7 @@
|
|||||||
- [#134](https://github.com/WireMock-Net/WireMock.Net/pull/134) - Stef negate matcher contributed by [alastairtree](https://github.com/alastairtree)
|
- [#134](https://github.com/WireMock-Net/WireMock.Net/pull/134) - Stef negate matcher contributed by [alastairtree](https://github.com/alastairtree)
|
||||||
- [#135](https://github.com/WireMock-Net/WireMock.Net/pull/135) - Merge into the stef_negate_matcher branch (solves issue #133) contributed by [StefH](https://github.com/StefH)
|
- [#135](https://github.com/WireMock-Net/WireMock.Net/pull/135) - Merge into the stef_negate_matcher branch (solves issue #133) contributed by [StefH](https://github.com/StefH)
|
||||||
- [#138](https://github.com/WireMock-Net/WireMock.Net/pull/138) - Added Negate matcher logic contributed by [StefH](https://github.com/StefH)
|
- [#138](https://github.com/WireMock-Net/WireMock.Net/pull/138) - Added Negate matcher logic contributed by [StefH](https://github.com/StefH)
|
||||||
- [#128](https://github.com/WireMock-Net/WireMock.Net/issues/128) - Feature: Negate a matcher [feature, question]
|
|
||||||
- [#130](https://github.com/WireMock-Net/WireMock.Net/issues/130) - ...
|
- [#130](https://github.com/WireMock-Net/WireMock.Net/issues/130) - ...
|
||||||
- [#133](https://github.com/WireMock-Net/WireMock.Net/issues/133) - Issue: Wildcard matching a json body does not work? [bug, question]
|
|
||||||
|
|
||||||
# 1.0.3.16 (17 April 2018)
|
# 1.0.3.16 (17 April 2018)
|
||||||
- [#121](https://github.com/WireMock-Net/WireMock.Net/pull/121) - Fix for issue #118 [bug] contributed by [raghavendrabankapur](https://github.com/raghavendrabankapur)
|
- [#121](https://github.com/WireMock-Net/WireMock.Net/pull/121) - Fix for issue #118 [bug] contributed by [raghavendrabankapur](https://github.com/raghavendrabankapur)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.32</VersionPrefix>
|
<VersionPrefix>1.1.9</VersionPrefix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Choose>
|
<Choose>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
https://github.com/StefH/GitHubReleaseNotes
|
https://github.com/StefH/GitHubReleaseNotes
|
||||||
|
|
||||||
GitHubReleaseNotes.exe --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid --version 1.0.32.0
|
GitHubReleaseNotes.exe --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc --version 1.1.9.0
|
||||||
15
README.md
15
README.md
@@ -28,13 +28,14 @@ A C# .NET version based on [mock4net](https://github.com/alexvictoor/mock4net) w
|
|||||||
| **Sonar Coverage** | [](https://sonarcloud.io/component_measures?id=wiremock&metric=coverage) |
|
| **Sonar Coverage** | [](https://sonarcloud.io/component_measures?id=wiremock&metric=coverage) |
|
||||||
| **Codecov** | [](https://codecov.io/gh/WireMock-Net/WireMock.Net) |
|
| **Codecov** | [](https://codecov.io/gh/WireMock-Net/WireMock.Net) |
|
||||||
| **Coveralls** | [](https://coveralls.io/github/WireMock-Net/WireMock.Net?branch=master) |
|
| **Coveralls** | [](https://coveralls.io/github/WireMock-Net/WireMock.Net?branch=master) |
|
||||||
| |
|
|
||||||
| ***NuGet*** | |
|
### NuGet packages
|
||||||
| **WireMock.Net** | [](https://www.nuget.org/packages/WireMock.Net) |
|
|
||||||
| **WireMock.Net.StandAlone** | [](https://www.nuget.org/packages/WireMock.Net.StandAlone) |
|
| | Official | Preview |
|
||||||
| ***MyGet (previews)*** | |
|
| - | - | - |
|
||||||
| **WireMock.Net** | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net) |
|
| **WireMock.Net** | [](https://www.nuget.org/packages/WireMock.Net) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net)
|
||||||
| **WireMock.Net.StandAlone** | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.StandAlone) |
|
| **WireMock.Net.StandAlone** | [](https://www.nuget.org/packages/WireMock.Net.StandAlone) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.StandAlone)
|
||||||
|
| **WireMock.Net.RestClient** | [](https://www.nuget.org/packages/WireMock.Net.RestClient) | [](https://www.myget.org/feed/wiremock-net/package/nuget/WireMock.Net.RestClient)
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
For the supported frameworks and build information, see [this](https://github.com/WireMock-Net/WireMock.Net/wiki/Development-Information) page.
|
For the supported frameworks and build information, see [this](https://github.com/WireMock-Net/WireMock.Net/wiki/Development-Information) page.
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 15.0.27130.2036
|
VisualStudioVersion = 16.0.29709.97
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EF242EDF-7133-4277-9A0C-18744DE08707}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EF242EDF-7133-4277-9A0C-18744DE08707}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{197A0EE3-94E5-4807-BBCF-2F1BCA28A6AE}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{197A0EE3-94E5-4807-BBCF-2F1BCA28A6AE}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
.runsettings = .runsettings
|
.runsettings = .runsettings
|
||||||
|
azure-pipelines-ci-linux.yml = azure-pipelines-ci-linux.yml
|
||||||
|
azure-pipelines-ci.yml = azure-pipelines-ci.yml
|
||||||
azure-pipelines-linux.yml = azure-pipelines-linux.yml
|
azure-pipelines-linux.yml = azure-pipelines-linux.yml
|
||||||
azure-pipelines.yml = azure-pipelines.yml
|
azure-pipelines-nuget.yml = azure-pipelines-nuget.yml
|
||||||
build-info.md = build-info.md
|
build-info.md = build-info.md
|
||||||
CHANGELOG.md = CHANGELOG.md
|
CHANGELOG.md = CHANGELOG.md
|
||||||
Directory.Build.props = Directory.Build.props
|
Directory.Build.props = Directory.Build.props
|
||||||
@@ -35,14 +37,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.Proxy.
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Client", "examples\WireMock.Net.Client\WireMock.Net.Client.csproj", "{058D4B6C-C03E-49D0-91DB-A535B058FA0D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Client", "examples\WireMock.Net.Client\WireMock.Net.Client.csproj", "{058D4B6C-C03E-49D0-91DB-A535B058FA0D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.StandAlone", "src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj", "{B6269AAC-170A-43D5-8B9A-579DED3D9A95}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.StandAlone.NETCoreApp", "examples\WireMock.Net.StandAlone.NETCoreApp\WireMock.Net.StandAlone.NETCoreApp.csproj", "{10E16614-61CA-48D8-8BDD-664C13913DED}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.StandAlone.NETCoreApp", "examples\WireMock.Net.StandAlone.NETCoreApp\WireMock.Net.StandAlone.NETCoreApp.csproj", "{10E16614-61CA-48D8-8BDD-664C13913DED}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.StandAlone.Net452", "examples\WireMock.Net.StandAlone.Net452\WireMock.Net.StandAlone.Net452.csproj", "{668F689E-57B4-422E-8846-C0FF643CA999}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.StandAlone.Net452", "examples\WireMock.Net.StandAlone.Net452\WireMock.Net.StandAlone.Net452.csproj", "{668F689E-57B4-422E-8846-C0FF643CA999}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
{B6269AAC-170A-43D5-8B9A-579DED3D9A95} = {B6269AAC-170A-43D5-8B9A-579DED3D9A95}
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.WebApplication.NETCore2", "examples\WireMock.Net.WebApplication\WireMock.Net.WebApplication.NETCore2.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
|
EndProject
|
||||||
@@ -60,76 +57,252 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WireMock.Net.Console.Net452
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp2", "examples\WireMock.Net.Console.NETCoreApp2\WireMock.Net.Console.NETCoreApp2.csproj", "{83645809-9E01-4E81-8733-BA9497554ABF}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Console.NETCoreApp2", "examples\WireMock.Net.Console.NETCoreApp2\WireMock.Net.Console.NETCoreApp2.csproj", "{83645809-9E01-4E81-8733-BA9497554ABF}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.RestClient", "src\WireMock.Net.RestClient\WireMock.Net.RestClient.csproj", "{B6269AAC-170A-43D6-8B9A-579DED3D9A96}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.Abstractions", "src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj", "{B6269AAC-170A-4346-8B9A-579DED3D9A94}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WireMock.Net.StandAlone", "src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj", "{B6269AAC-170A-43D5-8B9A-579DED3D9A95}"
|
||||||
|
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}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug - Sonar|Any CPU = Debug - Sonar|Any CPU
|
||||||
|
Debug - Sonar|x64 = Debug - Sonar|x64
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
|
Release|x64 = Release|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{D3804228-91F4-4502-9595-39584E5A01AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{D3804228-91F4-4502-9595-39584E5A01AD}.Release|Any CPU.Build.0 = Release|Any CPU
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{D3804228-91F4-4502-9595-39584E5A01AD}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Debug|x64.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.ActiveCfg = Release|Any CPU
|
||||||
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Release|Any CPU.Build.0 = Release|Any CPU
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{FE281639-B014-4C8A-96FA-141164A74713}.Debug|Any CPU.ActiveCfg = Debug|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}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Debug|x64.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.ActiveCfg = Release|Any CPU
|
||||||
{FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.Build.0 = Release|Any CPU
|
{FE281639-B014-4C8A-96FA-141164A74713}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{FE281639-B014-4C8A-96FA-141164A74713}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{1995E414-F197-4AB4-90C2-68D806B5AF59}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Release|Any CPU.Build.0 = Release|Any CPU
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Release|Any CPU.Build.0 = Release|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|Any CPU.Build.0 = Release|Any CPU
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{10E16614-61CA-48D8-8BDD-664C13913DED}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA999}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA999}.Release|Any CPU.Build.0 = Release|Any CPU
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA999}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug - Sonar|x64.ActiveCfg = Debug|x64
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug - Sonar|x64.Build.0 = Debug|x64
|
||||||
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug|Any CPU.ActiveCfg = Debug|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}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Debug|x64.Build.0 = Debug|x64
|
||||||
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|Any CPU.Build.0 = Release|Any CPU
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{26433A8F-BF01-4962-97EB-81BFFBB61096}.Release|x64.Build.0 = Release|x64
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{23A9AA3C-40FC-42AA-8A5E-05899795A1C6}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Release|Any CPU.Build.0 = Release|Any CPU
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{3C279524-DB73-4DE3-BEF1-F2B2958C9F65}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Debug|x64.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.ActiveCfg = Release|Any CPU
|
||||||
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{7F0B2446-0363-4720-AF46-F47F83B557DC}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug|Any CPU.ActiveCfg = Debug|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}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Debug|x64.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.ActiveCfg = Release|Any CPU
|
||||||
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Release|Any CPU.Build.0 = Release|Any CPU
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug|Any CPU.ActiveCfg = Debug|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}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA268}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA268}.Release|Any CPU.Build.0 = Release|Any CPU
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{668F689E-57B4-422E-8846-C0FF643CA268}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
{83645809-9E01-4E81-8733-BA9497554ABF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{83645809-9E01-4E81-8733-BA9497554ABF}.Release|Any CPU.Build.0 = Release|Any CPU
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{83645809-9E01-4E81-8733-BA9497554ABF}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95}.Release|x64.Build.0 = Release|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug - Sonar|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug - Sonar|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug - Sonar|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug - Sonar|x64.Build.0 = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Debug|x64.Build.0 = Debug|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Release|x64.ActiveCfg = Release|Any CPU
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575}.Release|x64.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -140,7 +313,6 @@ Global
|
|||||||
{FE281639-B014-4C8A-96FA-141164A74713} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{FE281639-B014-4C8A-96FA-141164A74713} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{1995E414-F197-4AB4-90C2-68D806B5AF59} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{1995E414-F197-4AB4-90C2-68D806B5AF59} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{058D4B6C-C03E-49D0-91DB-A535B058FA0D} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{058D4B6C-C03E-49D0-91DB-A535B058FA0D} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{B6269AAC-170A-43D5-8B9A-579DED3D9A95} = {EF242EDF-7133-4277-9A0C-18744DE08707}
|
|
||||||
{10E16614-61CA-48D8-8BDD-664C13913DED} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{10E16614-61CA-48D8-8BDD-664C13913DED} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA999} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{668F689E-57B4-422E-8846-C0FF643CA999} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{049539C1-7A66-4559-AD7A-B1C73B97CBB0} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{049539C1-7A66-4559-AD7A-B1C73B97CBB0} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
@@ -151,6 +323,10 @@ Global
|
|||||||
{1261BB9B-A7D4-456C-8985-3CE560361B8E} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{1261BB9B-A7D4-456C-8985-3CE560361B8E} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{668F689E-57B4-422E-8846-C0FF643CA268} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{668F689E-57B4-422E-8846-C0FF643CA268} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
{83645809-9E01-4E81-8733-BA9497554ABF} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
{83645809-9E01-4E81-8733-BA9497554ABF} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
|
{B6269AAC-170A-43D6-8B9A-579DED3D9A96} = {EF242EDF-7133-4277-9A0C-18744DE08707}
|
||||||
|
{B6269AAC-170A-4346-8B9A-579DED3D9A94} = {EF242EDF-7133-4277-9A0C-18744DE08707}
|
||||||
|
{B6269AAC-170A-43D5-8B9A-579DED3D9A95} = {EF242EDF-7133-4277-9A0C-18744DE08707}
|
||||||
|
{A9D039B9-7509-4CF1-9EFD-87EB82998575} = {F0C22C47-DF71-463C-9B04-B4E0F3B8708A}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {BF428BCC-C837-433B-87D2-15C7014B73E9}
|
SolutionGuid = {BF428BCC-C837-433B-87D2-15C7014B73E9}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CS/@EntryIndexedValue">CS</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD5</s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MD/@EntryIndexedValue">MD5</s:String>
|
||||||
|
|||||||
13
azure-pipelines-ci-linux.yml
Normal file
13
azure-pipelines-ci-linux.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu 16.04'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
buildConfiguration: 'Release'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework netcoreapp2.1 --logger trx
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testRunner: VSTest
|
||||||
|
testResultsFiles: '**/*.trx'
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
pool:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'windows-2019'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
Prerelease: 'ci'
|
Prerelease: 'ci'
|
||||||
@@ -26,6 +26,7 @@ steps:
|
|||||||
- script: |
|
- script: |
|
||||||
%USERPROFILE%\.dotnet\tools\dotnet-sonarscanner begin /k:"wiremock" /o:"stefh-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$(SONAR_TOKEN)" /v:"$(buildId)" /d:sonar.cs.opencover.reportsPaths="**\coverage.opencover.xml"
|
%USERPROFILE%\.dotnet\tools\dotnet-sonarscanner begin /k:"wiremock" /o:"stefh-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$(SONAR_TOKEN)" /v:"$(buildId)" /d:sonar.cs.opencover.reportsPaths="**\coverage.opencover.xml"
|
||||||
displayName: Begin SonarScanner
|
displayName: Begin SonarScanner
|
||||||
|
condition: and(succeeded(), eq(variables['RUN_SONAR'], 'yes'))
|
||||||
|
|
||||||
# Build source, tests and run tests for net452 and netcoreapp2.1 (with coverage)
|
# Build source, tests and run tests for net452 and netcoreapp2.1 (with coverage)
|
||||||
- script: |
|
- script: |
|
||||||
@@ -37,16 +38,20 @@ steps:
|
|||||||
- script: |
|
- script: |
|
||||||
%USERPROFILE%\.dotnet\tools\dotnet-sonarscanner end /d:sonar.login="$(SONAR_TOKEN)"
|
%USERPROFILE%\.dotnet\tools\dotnet-sonarscanner end /d:sonar.login="$(SONAR_TOKEN)"
|
||||||
displayName: End SonarScanner
|
displayName: End SonarScanner
|
||||||
|
condition: and(succeeded(), eq(variables['RUN_SONAR'], 'yes'))
|
||||||
|
|
||||||
- task: whitesource.ws-bolt.bolt.wss.WhiteSource Bolt@19
|
- task: whitesource.ws-bolt.bolt.wss.WhiteSource Bolt@19
|
||||||
displayName: 'WhiteSource Bolt'
|
displayName: 'WhiteSource Bolt'
|
||||||
|
condition: and(succeeded(), eq(variables['RUN_WHITESOURCE'], 'yes'))
|
||||||
|
|
||||||
# Upload coverage to codecov.io
|
# Upload coverage to codecov.io
|
||||||
- script: |
|
- script: |
|
||||||
%USERPROFILE%\.nuget\packages\codecov\1.1.0\tools\codecov.exe -f "./test/WireMock.Net.Tests/coverage.opencover.xml" -t $(CODECOV_TOKEN)
|
%USERPROFILE%\.nuget\packages\codecov\1.1.0\tools\codecov.exe -f "./test/WireMock.Net.Tests/coverage.opencover.xml" -t $(CODECOV_TOKEN)
|
||||||
displayName: Upload coverage to codecov.io
|
displayName: Upload coverage to codecov.io
|
||||||
|
|
||||||
|
# https://github.com/microsoft/azure-pipelines-tasks/issues/12212
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
|
condition: and(succeeded(), eq(variables['PUBLISH_TESTRESULTS'], 'yes'))
|
||||||
inputs:
|
inputs:
|
||||||
testRunner: VSTest
|
testRunner: VSTest
|
||||||
testResultsFiles: '**/*.trx'
|
testResultsFiles: '**/*.trx'
|
||||||
@@ -76,10 +81,11 @@ steps:
|
|||||||
inputs:
|
inputs:
|
||||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
# https://github.com/NuGet/Home/issues/8148
|
||||||
- task: DotNetCoreCLI@2
|
- task: DotNetCoreCLI@2
|
||||||
displayName: Push to MyGet
|
displayName: Push to MyGet
|
||||||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
inputs:
|
inputs:
|
||||||
command: custom
|
command: custom
|
||||||
custom: nuget
|
custom: nuget
|
||||||
arguments: push $(Build.ArtifactStagingDirectory)\packages\*.nupkg --source https://www.myget.org/F/wiremock-net/api/v3/index.json --no-service-endpoint --api-key $(MyGetKey)
|
arguments: push $(Build.ArtifactStagingDirectory)\packages\*.nupkg -n true -s https://www.myget.org/F/wiremock-net/api/v3/index.json -k $(MyGetKey)
|
||||||
@@ -1,13 +1,23 @@
|
|||||||
|
trigger:
|
||||||
|
- none
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu 16.04'
|
vmImage: 'Ubuntu 16.04'
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
buildProjects: '**/src/**/*.csproj'
|
||||||
buildConfiguration: 'Release'
|
buildConfiguration: 'Release'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- task: DotNetCoreCLI@2
|
||||||
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration $(buildConfiguration) --framework netcoreapp2.1 --logger trx
|
displayName: Build Release
|
||||||
- task: PublishTestResults@2
|
|
||||||
inputs:
|
inputs:
|
||||||
testRunner: VSTest
|
command: 'build'
|
||||||
testResultsFiles: '**/*.trx'
|
arguments: /p:Configuration=$(buildConfiguration)
|
||||||
|
projects: $(buildProjects)
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Publish Artifacts
|
||||||
|
condition: succeeded()
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
46
azure-pipelines-nuget.yml
Normal file
46
azure-pipelines-nuget.yml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
pool:
|
||||||
|
vmImage: 'vs2017-win2016'
|
||||||
|
|
||||||
|
variables:
|
||||||
|
Prerelease: ''
|
||||||
|
buildId: "1$(Build.BuildId)"
|
||||||
|
buildProjects: '**/src/**/*.csproj'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Print buildId
|
||||||
|
- script: |
|
||||||
|
echo "BuildId = $(buildId)"
|
||||||
|
displayName: 'Print buildId'
|
||||||
|
|
||||||
|
# Based on https://whereslou.com/2018/09/versioning-and-publishing-nuget-packages-automatically-using-azure-devops-pipelines/
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Build Release
|
||||||
|
inputs:
|
||||||
|
command: 'build'
|
||||||
|
arguments: /p:Configuration=Release # https://github.com/MicrosoftDocs/vsts-docs/issues/1976
|
||||||
|
projects: $(buildProjects)
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Pack
|
||||||
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
|
inputs:
|
||||||
|
command: pack
|
||||||
|
configuration: 'Release'
|
||||||
|
packagesToPack: $(buildProjects)
|
||||||
|
nobuild: true
|
||||||
|
packDirectory: '$(Build.ArtifactStagingDirectory)/packages'
|
||||||
|
verbosityPack: 'normal'
|
||||||
|
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
displayName: Publish Artifacts
|
||||||
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
|
inputs:
|
||||||
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||||
|
|
||||||
|
- task: DotNetCoreCLI@2
|
||||||
|
displayName: Push to NuGet
|
||||||
|
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # Do not run for PullRequests
|
||||||
|
inputs:
|
||||||
|
command: custom
|
||||||
|
custom: nuget
|
||||||
|
arguments: push $(Build.ArtifactStagingDirectory)\packages\*.nupkg -n true -s https://api.nuget.org/v3/index.json -k $(NuGetKey)
|
||||||
@@ -3,44 +3,45 @@ using RestEase;
|
|||||||
using System;
|
using System;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using WireMock.Client;
|
using WireMock.Client;
|
||||||
|
|
||||||
namespace WireMock.Net.Client
|
namespace WireMock.Net.Client
|
||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static async Task Main(string[] args)
|
||||||
{
|
{
|
||||||
// Create an implementation of the IFluentMockServerAdmin and pass in the base URL for the API.
|
// Create an implementation of the IWireMockAdminApi and pass in the base URL for the API.
|
||||||
var api = RestClient.For<IFluentMockServerAdmin>("http://localhost:9091");
|
var api = RestClient.For<IWireMockAdminApi>("http://localhost:9091");
|
||||||
|
|
||||||
// Set BASIC Auth
|
// Set BASIC Auth
|
||||||
var value = Convert.ToBase64String(Encoding.ASCII.GetBytes("a:b"));
|
var value = Convert.ToBase64String(Encoding.ASCII.GetBytes("a:b"));
|
||||||
api.Authorization = new AuthenticationHeaderValue("Basic", value);
|
api.Authorization = new AuthenticationHeaderValue("Basic", value);
|
||||||
|
|
||||||
var settings1 = api.GetSettingsAsync().Result;
|
var settings1 = await api.GetSettingsAsync();
|
||||||
Console.WriteLine($"settings1 = {JsonConvert.SerializeObject(settings1)}");
|
Console.WriteLine($"settings1 = {JsonConvert.SerializeObject(settings1)}");
|
||||||
|
|
||||||
settings1.GlobalProcessingDelay = 1077;
|
settings1.GlobalProcessingDelay = 1077;
|
||||||
api.PostSettingsAsync(settings1).Wait();
|
api.PostSettingsAsync(settings1).Wait();
|
||||||
|
|
||||||
var settings2 = api.GetSettingsAsync().Result;
|
var settings2 = await api.GetSettingsAsync();
|
||||||
Console.WriteLine($"settings2 = {JsonConvert.SerializeObject(settings2)}");
|
Console.WriteLine($"settings2 = {JsonConvert.SerializeObject(settings2)}");
|
||||||
|
|
||||||
var mappings = api.GetMappingsAsync().Result;
|
var mappings = await api.GetMappingsAsync();
|
||||||
Console.WriteLine($"mappings = {JsonConvert.SerializeObject(mappings)}");
|
Console.WriteLine($"mappings = {JsonConvert.SerializeObject(mappings)}");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var guid = Guid.Parse("11111110-a633-40e8-a244-5cb80bc0ab66");
|
var guid = Guid.Parse("11111110-a633-40e8-a244-5cb80bc0ab66");
|
||||||
var mapping = api.GetMappingAsync(guid).Result;
|
var mapping = await api.GetMappingAsync(guid);
|
||||||
Console.WriteLine($"mapping = {JsonConvert.SerializeObject(mapping)}");
|
Console.WriteLine($"mapping = {JsonConvert.SerializeObject(mapping)}");
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
var request = api.GetRequestsAsync().Result;
|
var request = await api.GetRequestsAsync();
|
||||||
Console.WriteLine($"request = {JsonConvert.SerializeObject(request)}");
|
Console.WriteLine($"request = {JsonConvert.SerializeObject(request)}");
|
||||||
|
|
||||||
//var deleteRequestsAsync = api.DeleteRequestsAsync().Result;
|
//var deleteRequestsAsync = api.DeleteRequestsAsync().Result;
|
||||||
@@ -49,15 +50,21 @@ namespace WireMock.Net.Client
|
|||||||
//var resetRequestsAsync = api.ResetRequestsAsync().Result;
|
//var resetRequestsAsync = api.ResetRequestsAsync().Result;
|
||||||
//Console.WriteLine($"ResetRequestsAsync = {resetRequestsAsync.Status}");
|
//Console.WriteLine($"ResetRequestsAsync = {resetRequestsAsync.Status}");
|
||||||
|
|
||||||
var scenarioStates = api.GetScenariosAsync().Result;
|
var scenarioStates = await api.GetScenariosAsync();
|
||||||
Console.WriteLine($"GetScenariosAsync = {JsonConvert.SerializeObject(scenarioStates)}");
|
Console.WriteLine($"GetScenariosAsync = {JsonConvert.SerializeObject(scenarioStates)}");
|
||||||
|
|
||||||
var postFileResult = api.PostFileAsync("1.cs", "C# Hello").GetAwaiter().GetResult();
|
var postFileResult = await api.PostFileAsync("1.cs", "C# Hello");
|
||||||
Console.WriteLine($"postFileResult = {JsonConvert.SerializeObject(postFileResult)}");
|
Console.WriteLine($"postFileResult = {JsonConvert.SerializeObject(postFileResult)}");
|
||||||
|
|
||||||
var getFileResult = api.GetFileAsync("1.cs").GetAwaiter().GetResult();
|
var getFileResult = await api.GetFileAsync("1.cs");
|
||||||
Console.WriteLine($"getFileResult = {getFileResult}");
|
Console.WriteLine($"getFileResult = {getFileResult}");
|
||||||
|
|
||||||
|
var resetMappingsAsync = await api.ResetMappingsAsync();
|
||||||
|
Console.WriteLine($"resetMappingsAsync = {resetMappingsAsync.Status}");
|
||||||
|
|
||||||
|
var resetMappingsAndReloadStaticMappingsAsync = await api.ResetMappingsAsync(true);
|
||||||
|
Console.WriteLine($"resetMappingsAndReloadStaticMappingsAsync = {resetMappingsAndReloadStaticMappingsAsync.Status}");
|
||||||
|
|
||||||
Console.WriteLine("Press any key to quit");
|
Console.WriteLine("Press any key to quit");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,18 +2,19 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<!-- <RuntimeFrameworkVersion>1.0.1</RuntimeFrameworkVersion> -->
|
|
||||||
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<PackageReference Include="RestEase" Version="1.4.7" />
|
<PackageReference Include="RestEase" Version="1.4.10" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net.RestClient\WireMock.Net.RestClient.csproj" />
|
||||||
|
<!--<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />-->
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -18,6 +18,10 @@
|
|||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="__admin\mappings\1.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="__admin\mappings\array.json" />
|
<None Remove="__admin\mappings\array.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
// C# Hello
|
||||||
@@ -21,9 +21,9 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.EnumerateFiles"/>
|
/// <inheritdoc cref="IFileSystemHandler.EnumerateFiles"/>
|
||||||
public IEnumerable<string> EnumerateFiles(string path)
|
public IEnumerable<string> EnumerateFiles(string path, bool includeSubdirectories)
|
||||||
{
|
{
|
||||||
return Directory.EnumerateFiles(path);
|
return includeSubdirectories ? Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories) : Directory.EnumerateFiles(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.GetMappingFolder"/>
|
/// <inheritdoc cref="IFileSystemHandler.GetMappingFolder"/>
|
||||||
|
|||||||
@@ -39,12 +39,14 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
string url2 = "http://localhost:9092/";
|
string url2 = "http://localhost:9092/";
|
||||||
string url3 = "https://localhost:9443/";
|
string url3 = "https://localhost:9443/";
|
||||||
|
|
||||||
var server = FluentMockServer.Start(new FluentMockServerSettings
|
var server = WireMockServer.Start(new WireMockServerSettings
|
||||||
{
|
{
|
||||||
|
AllowCSharpCodeMatcher = true,
|
||||||
Urls = new[] { url1, url2, url3 },
|
Urls = new[] { url1, url2, url3 },
|
||||||
StartAdminInterface = true,
|
StartAdminInterface = true,
|
||||||
ReadStaticMappings = true,
|
ReadStaticMappings = true,
|
||||||
WatchStaticMappings = true,
|
WatchStaticMappings = true,
|
||||||
|
WatchStaticMappingsInSubdirectories = true,
|
||||||
//ProxyAndRecordSettings = new ProxyAndRecordSettings
|
//ProxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
//{
|
//{
|
||||||
// SaveMapping = true
|
// SaveMapping = true
|
||||||
@@ -57,12 +59,14 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
{
|
{
|
||||||
var transformer = new CustomNameTransformer();
|
var transformer = new CustomNameTransformer();
|
||||||
handlebarsContext.RegisterHelper(transformer.Name, transformer.Render);
|
handlebarsContext.RegisterHelper(transformer.Name, transformer.Render);
|
||||||
}
|
},
|
||||||
|
|
||||||
|
AllowAnyHttpStatusCodeInResponse = true
|
||||||
|
|
||||||
// Uncomment below if you want to use the CustomFileSystemFileHandler
|
// Uncomment below if you want to use the CustomFileSystemFileHandler
|
||||||
// FileSystemHandler = new CustomFileSystemFileHandler()
|
// FileSystemHandler = new CustomFileSystemFileHandler()
|
||||||
});
|
});
|
||||||
System.Console.WriteLine("FluentMockServer listening at {0}", string.Join(",", server.Urls));
|
System.Console.WriteLine("WireMockServer listening at {0}", string.Join(",", server.Urls));
|
||||||
|
|
||||||
server.SetBasicAuthentication("a", "b");
|
server.SetBasicAuthentication("a", "b");
|
||||||
|
|
||||||
@@ -103,6 +107,24 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.WithProxy(new ProxyAndRecordSettings { Url = "http://postman-echo.com/get" })
|
.WithProxy(new ProxyAndRecordSettings { Url = "http://postman-echo.com/get" })
|
||||||
);
|
);
|
||||||
|
|
||||||
|
server
|
||||||
|
.Given(Request.Create()
|
||||||
|
.UsingGet()
|
||||||
|
.WithHeader("postmanecho", "get2")
|
||||||
|
)
|
||||||
|
.RespondWith(Response.Create()
|
||||||
|
.WithProxy(new ProxyAndRecordSettings
|
||||||
|
{
|
||||||
|
Url = "http://postman-echo.com/get",
|
||||||
|
WebProxySettings = new WebProxySettings
|
||||||
|
{
|
||||||
|
Address = "http://company",
|
||||||
|
UserName = "test",
|
||||||
|
Password = "pwd"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
server
|
server
|
||||||
.Given(Request.Create()
|
.Given(Request.Create()
|
||||||
.UsingGet()
|
.UsingGet()
|
||||||
@@ -448,6 +470,7 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
DateTimeNowToString = DateTime.Now.ToString("s", CultureInfo.InvariantCulture),
|
DateTimeNowToString = DateTime.Now.ToString("s", CultureInfo.InvariantCulture),
|
||||||
Guid1 = "{{Random Type=\"Guid\" Uppercase=false}}",
|
Guid1 = "{{Random Type=\"Guid\" Uppercase=false}}",
|
||||||
Guid2 = "{{Random Type=\"Guid\"}}",
|
Guid2 = "{{Random Type=\"Guid\"}}",
|
||||||
|
Guid3 = "{{Random Type=\"Guid\" Format=\"X\"}}",
|
||||||
Boolean = "{{Random Type=\"Boolean\"}}",
|
Boolean = "{{Random Type=\"Boolean\"}}",
|
||||||
Integer = "{{Random Type=\"Integer\" Min=1000 Max=9999}}",
|
Integer = "{{Random Type=\"Integer\" Min=1000 Max=9999}}",
|
||||||
Long = "{{#Random Type=\"Long\" Min=10000000 Max=99999999}}{{this}}{{/Random}}",
|
Long = "{{#Random Type=\"Long\" Min=10000000 Max=99999999}}{{this}}{{/Random}}",
|
||||||
|
|||||||
@@ -80,9 +80,9 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj">
|
||||||
<Project>{b6269aac-170a-43d5-8b9a-579ded3d9a95}</Project>
|
<Project>{b6269aac-170a-4346-8b9a-579ded3d9a94}</Project>
|
||||||
<Name>WireMock.Net.StandAlone</Name>
|
<Name>WireMock.Net.Abstractions</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
||||||
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
||||||
|
|||||||
@@ -76,9 +76,9 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj">
|
||||||
<Project>{b6269aac-170a-43d5-8b9a-579ded3d9a95}</Project>
|
<Project>{b6269aac-170a-4346-8b9a-579ded3d9a94}</Project>
|
||||||
<Name>WireMock.Net.StandAlone</Name>
|
<Name>WireMock.Net.Abstractions</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
||||||
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace WireMock.Net.Console.Proxy.NETCoreApp2
|
|||||||
RunTestDifferentPort().Wait(20000); // prints "1"
|
RunTestDifferentPort().Wait(20000); // prints "1"
|
||||||
RunTestDifferentPort().Wait(20000); // prints "1"
|
RunTestDifferentPort().Wait(20000); // prints "1"
|
||||||
|
|
||||||
var server = FluentMockServer.Start(new FluentMockServerSettings
|
var server = WireMockServer.Start(new WireMockServerSettings
|
||||||
{
|
{
|
||||||
Urls = new[] { "http://localhost:9091", "https://localhost:9443" },
|
Urls = new[] { "http://localhost:9091", "https://localhost:9443" },
|
||||||
StartAdminInterface = true,
|
StartAdminInterface = true,
|
||||||
@@ -44,7 +44,7 @@ namespace WireMock.Net.Console.Proxy.NETCoreApp2
|
|||||||
|
|
||||||
private static async Task RunTestDifferentPort()
|
private static async Task RunTestDifferentPort()
|
||||||
{
|
{
|
||||||
var server = FluentMockServer.Start();
|
var server = WireMockServer.Start();
|
||||||
|
|
||||||
server.Given(Request.Create().WithPath("/").UsingGet())
|
server.Given(Request.Create().WithPath("/").UsingGet())
|
||||||
.RespondWith(Response.Create().WithStatusCode(200).WithBody("Hello"));
|
.RespondWith(Response.Create().WithStatusCode(200).WithBody("Hello"));
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj" />
|
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace WireMock.Net.Console.Proxy.Net452
|
|||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
string[] urls = { "http://localhost:9091/", "https://localhost:9443/" };
|
string[] urls = { "http://localhost:9091/", "https://localhost:9443/" };
|
||||||
var server = FluentMockServer.Start(new FluentMockServerSettings
|
var server = WireMockServer.Start(new WireMockServerSettings
|
||||||
{
|
{
|
||||||
Urls = urls,
|
Urls = urls,
|
||||||
StartAdminInterface = true,
|
StartAdminInterface = true,
|
||||||
|
|||||||
@@ -92,10 +92,6 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj">
|
|
||||||
<Project>{b6269aac-170a-43d5-8b9a-579ded3d9a95}</Project>
|
|
||||||
<Name>WireMock.Net.StandAlone</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
||||||
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
||||||
<Name>WireMock.Net</Name>
|
<Name>WireMock.Net</Name>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace WireMock.Net.Console.Proxy.NETCoreApp
|
|||||||
{
|
{
|
||||||
static void Main(params string[] args)
|
static void Main(params string[] args)
|
||||||
{
|
{
|
||||||
var server = FluentMockServer.Start(new FluentMockServerSettings
|
var server = WireMockServer.Start(new WireMockServerSettings
|
||||||
{
|
{
|
||||||
Urls = new[] { "http://localhost:9091/", "https://localhost:9443/" },
|
Urls = new[] { "http://localhost:9091/", "https://localhost:9443/" },
|
||||||
StartAdminInterface = true,
|
StartAdminInterface = true,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
63
examples/WireMock.Net.Console.RequestLogTest/Program.cs
Normal file
63
examples/WireMock.Net.Console.RequestLogTest/Program.cs
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using WireMock.Logging;
|
||||||
|
using WireMock.Net.StandAlone;
|
||||||
|
using WireMock.RequestBuilders;
|
||||||
|
using WireMock.ResponseBuilders;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
|
namespace WireMock.Net.Console.RequestLogTest
|
||||||
|
{
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static async Task Main(string[] args)
|
||||||
|
{
|
||||||
|
var server = StandAloneApp.Start(new FluentMockServerSettings
|
||||||
|
{
|
||||||
|
Port = 19019,
|
||||||
|
StartAdminInterface = true,
|
||||||
|
StartTimeout = 1000,
|
||||||
|
MaxRequestLogCount = 100,
|
||||||
|
RequestLogExpirationDuration = 6,
|
||||||
|
Logger = new WireMockConsoleLogger()
|
||||||
|
});
|
||||||
|
|
||||||
|
server
|
||||||
|
.Given(Request
|
||||||
|
.Create()
|
||||||
|
.UsingGet())
|
||||||
|
.RespondWith(Response.Create()
|
||||||
|
.WithHeader("Content-Type", "application/json")
|
||||||
|
.WithBodyAsJson(new { result = "x" }));
|
||||||
|
|
||||||
|
await Task.Delay(2000);
|
||||||
|
|
||||||
|
var client = new HttpClient();
|
||||||
|
client.BaseAddress = new Uri(server.Urls[0]);
|
||||||
|
|
||||||
|
var options = new ParallelOptions()
|
||||||
|
{
|
||||||
|
MaxDegreeOfParallelism = 2
|
||||||
|
};
|
||||||
|
|
||||||
|
var list = Enumerable.Range(1, 1000);
|
||||||
|
Parallel.ForEach(list, options, async i =>
|
||||||
|
{
|
||||||
|
string result = await client.GetStringAsync("/x");
|
||||||
|
System.Console.WriteLine(result);
|
||||||
|
});
|
||||||
|
|
||||||
|
//for (int i = 0; i < 1000; i++)
|
||||||
|
//{
|
||||||
|
// string result = await client.GetStringAsync("/x");
|
||||||
|
// System.Console.WriteLine(result);
|
||||||
|
//}
|
||||||
|
|
||||||
|
System.Console.WriteLine("Press any key to stop the server");
|
||||||
|
System.Console.ReadKey();
|
||||||
|
server.Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj" />
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -3,7 +3,6 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using WireMock.Net.Service;
|
using WireMock.Net.Service;
|
||||||
using WireMock.Net.StandAlone;
|
|
||||||
using WireMock.Server;
|
using WireMock.Server;
|
||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
|
|
||||||
@@ -12,7 +11,7 @@ namespace Wiremock.Net.Service
|
|||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
#region Nested classes to support running as service
|
#region Nested classes to support running as service
|
||||||
public const string ServiceName = "Wiremock.Net.Service";
|
public const string ServiceName = "WireMock.Net.Service";
|
||||||
|
|
||||||
public class Service : ServiceBase
|
public class Service : ServiceBase
|
||||||
{
|
{
|
||||||
@@ -33,7 +32,7 @@ namespace Wiremock.Net.Service
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private static FluentMockServer _server;
|
private static WireMockServer _server;
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
@@ -64,7 +63,7 @@ namespace Wiremock.Net.Service
|
|||||||
|
|
||||||
private static void Start()
|
private static void Start()
|
||||||
{
|
{
|
||||||
_server = StandAloneApp.Start(new FluentMockServerSettings
|
_server = WireMockServer.Start(new WireMockServerSettings
|
||||||
{
|
{
|
||||||
Urls = new[] { "http://*:9091/" },
|
Urls = new[] { "http://*:9091/" },
|
||||||
StartAdminInterface = true,
|
StartAdminInterface = true,
|
||||||
|
|||||||
@@ -47,18 +47,12 @@
|
|||||||
<Reference Include="Microsoft.Owin.Hosting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Owin.Hosting, Version=2.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Owin.Hosting.2.0.2\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MimeKitLite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\MimeKitLite.2.0.1\lib\net45\MimeKitLite.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
<HintPath>..\..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestEase, Version=1.4.7.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\RestEase.1.4.7\lib\net45\RestEase.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -86,8 +80,8 @@
|
|||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="XPath2, Version=1.0.7.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
<Reference Include="XPath2, Version=1.0.9.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\XPath2.1.0.6.1\lib\net40\XPath2.dll</HintPath>
|
<HintPath>..\..\packages\XPath2.1.0.10\lib\net40\XPath2.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -121,9 +115,9 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj">
|
||||||
<Project>{b6269aac-170a-43d5-8b9a-579ded3d9a95}</Project>
|
<Project>{b6269aac-170a-4346-8b9a-579ded3d9a94}</Project>
|
||||||
<Name>WireMock.Net.StandAlone</Name>
|
<Name>WireMock.Net.Abstractions</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
||||||
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using log4net;
|
using System;
|
||||||
|
using log4net;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Wiremock.Net.Service;
|
using Wiremock.Net.Service;
|
||||||
using WireMock.Admin.Requests;
|
using WireMock.Admin.Requests;
|
||||||
@@ -30,6 +31,11 @@ namespace WireMock.Net.Service
|
|||||||
Log.ErrorFormat(formatString, args);
|
Log.ErrorFormat(formatString, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Error(string message, Exception exception)
|
||||||
|
{
|
||||||
|
Log.Error(message, exception);
|
||||||
|
}
|
||||||
|
|
||||||
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
||||||
{
|
{
|
||||||
string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);
|
string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);
|
||||||
|
|||||||
@@ -9,11 +9,9 @@
|
|||||||
<package id="Microsoft.Owin" version="2.0.2" targetFramework="net452" />
|
<package id="Microsoft.Owin" version="2.0.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net452" />
|
<package id="Microsoft.Owin.Host.HttpListener" version="2.0.2" targetFramework="net452" />
|
||||||
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net452" />
|
<package id="Microsoft.Owin.Hosting" version="2.0.2" targetFramework="net452" />
|
||||||
<package id="MimeKitLite" version="2.0.1" targetFramework="net452" />
|
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net452" />
|
<package id="Owin" version="1.0" targetFramework="net452" />
|
||||||
<package id="RestEase" version="1.4.7" targetFramework="net452" />
|
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net452" />
|
||||||
<package id="System.Net.Http" version="4.3.3" targetFramework="net452" />
|
<package id="System.Net.Http" version="4.3.3" targetFramework="net452" />
|
||||||
<package id="XPath2" version="1.0.6.1" targetFramework="net452" />
|
<package id="XPath2" version="1.0.10" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using log4net;
|
using log4net;
|
||||||
using log4net.Config;
|
using log4net.Config;
|
||||||
using log4net.Repository;
|
using log4net.Repository;
|
||||||
using WireMock.Server;
|
using WireMock.Server;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
namespace WireMock.Net.StandAlone.NETCoreApp
|
namespace WireMock.Net.StandAlone.NETCoreApp
|
||||||
{
|
{
|
||||||
@@ -15,13 +17,16 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
|||||||
// private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
|
// private static readonly ILog Log = LogManager.GetLogger(typeof(Program));
|
||||||
|
|
||||||
private static int sleepTime = 30000;
|
private static int sleepTime = 30000;
|
||||||
private static FluentMockServer _server;
|
private static WireMockServer _server;
|
||||||
|
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
XmlConfigurator.Configure(LogRepository, new FileInfo("log4net.config"));
|
XmlConfigurator.Configure(LogRepository, new FileInfo("log4net.config"));
|
||||||
|
|
||||||
_server = StandAloneApp.Start(args, new WireMockLog4NetLogger());
|
var settings = WireMockServerSettingsParser.ParseArguments(args, new WireMockLog4NetLogger());
|
||||||
|
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||||
|
|
||||||
|
_server = WireMockServer.Start(settings);
|
||||||
|
|
||||||
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
Console.WriteLine($"{DateTime.UtcNow} Press Ctrl+C to shut down");
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;netcoreapp1.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
<StartupObject>WireMock.Net.StandAlone.NETCoreApp.Program</StartupObject>
|
<StartupObject>WireMock.Net.StandAlone.NETCoreApp.Program</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -12,7 +12,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using log4net;
|
using System;
|
||||||
|
using log4net;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using WireMock.Admin.Requests;
|
using WireMock.Admin.Requests;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
@@ -29,6 +30,11 @@ namespace WireMock.Net.StandAlone.NETCoreApp
|
|||||||
Log.ErrorFormat(formatString, args);
|
Log.ErrorFormat(formatString, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Error(string message, Exception exception)
|
||||||
|
{
|
||||||
|
Log.Error(message, exception);
|
||||||
|
}
|
||||||
|
|
||||||
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
||||||
{
|
{
|
||||||
string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);
|
string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using log4net.Config;
|
using log4net.Config;
|
||||||
|
using WireMock.Server;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
namespace WireMock.Net.StandAlone.Net452
|
namespace WireMock.Net.StandAlone.Net452
|
||||||
{
|
{
|
||||||
@@ -10,7 +13,10 @@ namespace WireMock.Net.StandAlone.Net452
|
|||||||
{
|
{
|
||||||
XmlConfigurator.Configure(new FileInfo("log4net.config"));
|
XmlConfigurator.Configure(new FileInfo("log4net.config"));
|
||||||
|
|
||||||
StandAloneApp.Start(args);
|
var settings = WireMockServerSettingsParser.ParseArguments(args);
|
||||||
|
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||||
|
|
||||||
|
WireMockServer.Start(settings);
|
||||||
|
|
||||||
Console.WriteLine("Press any key to stop the server");
|
Console.WriteLine("Press any key to stop the server");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
|
|||||||
@@ -70,9 +70,9 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj">
|
||||||
<Project>{b6269aac-170a-43d5-8b9a-579ded3d9a95}</Project>
|
<Project>{b6269aac-170a-4346-8b9a-579ded3d9a94}</Project>
|
||||||
<Name>WireMock.Net.StandAlone</Name>
|
<Name>WireMock.Net.Abstractions</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
||||||
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
<Project>{d3804228-91f4-4502-9595-39584e5a01ad}</Project>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using WireMock.RequestBuilders;
|
using System.Linq;
|
||||||
using WireMock.ResponseBuilders;
|
using WireMock.Server;
|
||||||
|
using WireMock.Settings;
|
||||||
|
|
||||||
namespace WireMock.Net.StandAlone.Net461
|
namespace WireMock.Net.StandAlone.Net461
|
||||||
{
|
{
|
||||||
@@ -8,9 +9,10 @@ namespace WireMock.Net.StandAlone.Net461
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var server = StandAloneApp.Start(args);
|
var settings = WireMockServerSettingsParser.ParseArguments(args);
|
||||||
server.Given(Request.Create())
|
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||||
.RespondWith(Response.Create().WithProxy("http://10.10.66.65"));
|
|
||||||
|
WireMockServer.Start(settings);
|
||||||
|
|
||||||
Console.WriteLine("Press any key to stop the server");
|
Console.WriteLine("Press any key to stop the server");
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
|
|||||||
@@ -204,8 +204,8 @@
|
|||||||
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="RestEase, Version=1.4.7.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="RestEase, Version=1.4.10.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\RestEase.1.4.7\lib\net45\RestEase.dll</HintPath>
|
<HintPath>..\..\packages\RestEase.1.4.10\lib\net45\RestEase.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
<Reference Include="SimMetrics.Net, Version=1.0.5.0, Culture=neutral, PublicKeyToken=c58dc06d59f3391b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
<HintPath>..\..\packages\SimMetrics.Net.1.0.5\lib\net45\SimMetrics.Net.dll</HintPath>
|
||||||
@@ -231,6 +231,7 @@
|
|||||||
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<Reference Include="System.Memory, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
<HintPath>..\..\packages\System.Memory.4.5.1\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.4\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.AspNet.WebApi.Client.5.2.4\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -279,12 +280,6 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="WireMock.Net, Version=1.0.4.20, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\WireMock.Net.1.0.4.20\lib\net461\WireMock.Net.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="WireMock.Net.StandAlone, Version=1.0.4.20, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\..\packages\WireMock.Net.StandAlone.1.0.4.20\lib\net46\WireMock.Net.StandAlone.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="XPath2, Version=1.0.7.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
<Reference Include="XPath2, Version=1.0.7.0, Culture=neutral, PublicKeyToken=463c6d7fb740c7e5, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\XPath2.1.0.6.1\lib\net40\XPath2.dll</HintPath>
|
<HintPath>..\..\packages\XPath2.1.0.6.1\lib\net40\XPath2.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -301,6 +296,16 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj">
|
||||||
|
<Project>{b6269aac-170a-4346-8b9a-579ded3d9a94}</Project>
|
||||||
|
<Name>WireMock.Net.Abstractions</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj">
|
||||||
|
<Project>{D3804228-91F4-4502-9595-39584E5A01AD}</Project>
|
||||||
|
<Name>WireMock.Net</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<package id="MimeKitLite" version="2.0.7" targetFramework="net461" />
|
<package id="MimeKitLite" version="2.0.7" targetFramework="net461" />
|
||||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||||
<package id="Owin" version="1.0" targetFramework="net461" />
|
<package id="Owin" version="1.0" targetFramework="net461" />
|
||||||
<package id="RestEase" version="1.4.7" targetFramework="net461" />
|
<package id="RestEase" version="1.4.10" targetFramework="net461" />
|
||||||
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
<package id="SimMetrics.Net" version="1.0.5" targetFramework="net461" />
|
||||||
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
|
<package id="System.Buffers" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="net461" />
|
||||||
@@ -78,7 +78,5 @@
|
|||||||
<package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
|
<package id="System.Security.Principal.Windows" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.Text.Encodings.Web" version="4.5.0" targetFramework="net461" />
|
<package id="System.Text.Encodings.Web" version="4.5.0" targetFramework="net461" />
|
||||||
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
|
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="WireMock.Net" version="1.0.4.20" targetFramework="net461" />
|
|
||||||
<package id="WireMock.Net.StandAlone" version="1.0.4.20" targetFramework="net461" />
|
|
||||||
<package id="XPath2" version="1.0.6.1" targetFramework="net461" />
|
<package id="XPath2" version="1.0.6.1" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -43,9 +43,9 @@ namespace WireMock.Net.WebApplication
|
|||||||
// Add access to generic IConfigurationRoot
|
// Add access to generic IConfigurationRoot
|
||||||
serviceCollection.AddSingleton(configuration);
|
serviceCollection.AddSingleton(configuration);
|
||||||
|
|
||||||
// Add access to IFluentMockServerSettings
|
// Add access to WireMockServerSettings
|
||||||
var settings = configuration.GetSection("FluentMockServerSettings").Get<FluentMockServerSettings>();
|
var settings = configuration.GetSection("WireMockServerSettings").Get<WireMockServerSettings>();
|
||||||
serviceCollection.AddSingleton<IFluentMockServerSettings>(settings);
|
serviceCollection.AddSingleton<WireMockServerSettings>(settings);
|
||||||
|
|
||||||
// Add services
|
// Add services
|
||||||
serviceCollection.AddTransient<IWireMockService, WireMockService>();
|
serviceCollection.AddTransient<IWireMockService, WireMockService>();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
|
||||||
<StartupObject>WireMock.Net.WebApplication.Program</StartupObject>
|
<StartupObject>WireMock.Net.WebApplication.Program</StartupObject>
|
||||||
<AssemblyName>WireMock.Net.WebApplication</AssemblyName>
|
<AssemblyName>WireMock.Net.WebApplication</AssemblyName>
|
||||||
@@ -11,18 +11,18 @@
|
|||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0'">
|
||||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.2" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.8" />
|
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1'">
|
||||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.5" />
|
<PackageReference Include="Microsoft.AspNetCore.All" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net.StandAlone\WireMock.Net.StandAlone.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using WireMock.Admin.Requests;
|
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
using WireMock.Net.StandAlone;
|
using WireMock.Models.Requests;
|
||||||
|
using WireMock.Server;
|
||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
|
|
||||||
namespace WireMock.Net.WebApplication
|
namespace WireMock.Net.WebApplication
|
||||||
@@ -13,7 +13,7 @@ namespace WireMock.Net.WebApplication
|
|||||||
private static int sleepTime = 30000;
|
private static int sleepTime = 30000;
|
||||||
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
private readonly IFluentMockServerSettings _settings;
|
private readonly WireMockServerSettings _settings;
|
||||||
|
|
||||||
private class Logger : IWireMockLogger
|
private class Logger : IWireMockLogger
|
||||||
{
|
{
|
||||||
@@ -51,7 +51,7 @@ namespace WireMock.Net.WebApplication
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public WireMockService(ILogger logger, IFluentMockServerSettings settings)
|
public WireMockService(ILogger logger, WireMockServerSettings settings)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_settings = settings;
|
_settings = settings;
|
||||||
@@ -63,7 +63,7 @@ namespace WireMock.Net.WebApplication
|
|||||||
{
|
{
|
||||||
_logger.LogInformation("WireMock.Net server starting");
|
_logger.LogInformation("WireMock.Net server starting");
|
||||||
|
|
||||||
StandAloneApp.Start(_settings);
|
WireMockServer.Start(_settings);
|
||||||
|
|
||||||
_logger.LogInformation($"WireMock.Net server settings {JsonConvert.SerializeObject(_settings)}");
|
_logger.LogInformation($"WireMock.Net server settings {JsonConvert.SerializeObject(_settings)}");
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"FluentMockServerSettings": {
|
"WireMockServerSettings": {
|
||||||
"AdminUsername": "a",
|
"AdminUsername": "a",
|
||||||
"AdminPassword": "b",
|
"AdminPassword": "b",
|
||||||
"StartAdminInterface": true
|
"StartAdminInterface": true
|
||||||
|
|||||||
BIN
resources/MyGet-Config.png
Normal file
BIN
resources/MyGet-Config.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
resources/MyGet-Use.png
Normal file
BIN
resources/MyGet-Use.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
@@ -16,5 +16,15 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// Gets or sets the matchers.
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<MatcherModel> Matchers { get; set; }
|
public IList<MatcherModel> Matchers { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the ignore case.
|
||||||
|
/// </summary>
|
||||||
|
public bool? IgnoreCase { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reject on match.
|
||||||
|
/// </summary>
|
||||||
|
public bool? RejectOnMatch { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
18
src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs
Normal file
18
src/WireMock.Net.Abstractions/Admin/Mappings/FaultModel.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
namespace WireMock.Admin.Mappings
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Fault Model
|
||||||
|
/// </summary>
|
||||||
|
public class FaultModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the fault. Can be null, "", NONE, EMPTY_RESPONSE, MALFORMED_RESPONSE_CHUNK or RANDOM_DATA_THEN_CLOSE.
|
||||||
|
/// </summary>
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the fault percentage.
|
||||||
|
/// </summary>
|
||||||
|
public double? Percentage { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,5 +16,15 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// Gets or sets the matchers.
|
/// Gets or sets the matchers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IList<MatcherModel> Matchers { get; set; }
|
public IList<MatcherModel> Matchers { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the ignore case.
|
||||||
|
/// </summary>
|
||||||
|
public bool? IgnoreCase { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reject on match.
|
||||||
|
/// </summary>
|
||||||
|
public bool? RejectOnMatch { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the HTTP status.
|
/// Gets or sets the HTTP status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? StatusCode { get; set; }
|
public object StatusCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body destination (SameAsSource, String or Bytes).
|
/// Gets or sets the body destination (SameAsSource, String or Bytes).
|
||||||
@@ -22,11 +22,6 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Body { get; set; }
|
public string Body { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the body.
|
|
||||||
/// </summary>
|
|
||||||
public string BodyFromBase64 { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the body (as JSON object).
|
/// Gets or sets the body (as JSON object).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -62,6 +57,11 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? UseTransformer { get; set; }
|
public bool? UseTransformer { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use the Handlerbars transformer for the content from the referenced BodyAsFile.
|
||||||
|
/// </summary>
|
||||||
|
public bool? UseTransformerForBodyAsFile { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the headers.
|
/// Gets or sets the headers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -86,5 +86,15 @@ namespace WireMock.Admin.Mappings
|
|||||||
/// The client X509Certificate2 Thumbprint or SubjectName to use.
|
/// The client X509Certificate2 Thumbprint or SubjectName to use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string X509Certificate2ThumbprintOrSubjectName { get; set; }
|
public string X509Certificate2ThumbprintOrSubjectName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the fault.
|
||||||
|
/// </summary>
|
||||||
|
public FaultModel Fault { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the WebProxy settings.
|
||||||
|
/// </summary>
|
||||||
|
public WebProxyModel WebProxy { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
namespace WireMock.Admin.Mappings
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// WebProxy settings
|
||||||
|
/// </summary>
|
||||||
|
public class WebProxyModel
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A string instance that contains the address of the proxy server.
|
||||||
|
/// </summary>
|
||||||
|
public string Address { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The user name associated with the credentials.
|
||||||
|
/// </summary>
|
||||||
|
public string UserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The password for the user name associated with the credentials.
|
||||||
|
/// </summary>
|
||||||
|
public string Password { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
using WireMock.Util;
|
using WireMock.Types;
|
||||||
|
|
||||||
namespace WireMock.Admin.Requests
|
namespace WireMock.Admin.Requests
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
using WireMock.Util;
|
using WireMock.Types;
|
||||||
|
|
||||||
namespace WireMock.Admin.Requests
|
namespace WireMock.Admin.Requests
|
||||||
{
|
{
|
||||||
@@ -12,7 +12,7 @@ namespace WireMock.Admin.Requests
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the status code.
|
/// Gets or sets the status code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int StatusCode { get; set; } = 200;
|
public object StatusCode { get; set; } = 200;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the headers.
|
/// Gets the headers.
|
||||||
@@ -68,5 +68,15 @@ namespace WireMock.Admin.Requests
|
|||||||
/// The detected body type (detection based on Content-Type).
|
/// The detected body type (detection based on Content-Type).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BodyType DetectedBodyTypeFromContentType { get; set; }
|
public BodyType DetectedBodyTypeFromContentType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The FaultType.
|
||||||
|
/// </summary>
|
||||||
|
public string FaultType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the Fault percentage.
|
||||||
|
/// </summary>
|
||||||
|
public double? FaultPercentage { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,5 +24,10 @@
|
|||||||
/// Gets or sets the MaxRequestLog count.
|
/// Gets or sets the MaxRequestLog count.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxRequestLogCount { get; set; }
|
public int? MaxRequestLogCount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets wether to allow a body for all HTTP methods.
|
||||||
|
/// </summary>
|
||||||
|
public bool? AllowBodyForAllHttpMethods { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -31,8 +31,9 @@ namespace WireMock.Handlers
|
|||||||
/// Returns an enumerable collection of file names in a specified path.
|
/// Returns an enumerable collection of file names in a specified path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path">The path.</param>
|
/// <param name="path">The path.</param>
|
||||||
/// <returns>An enumerable collection of the full names (including paths) for the files in the directory specified by path.</returns>
|
/// <param name="includeSubdirectories">A value indicating whether subdirectories should also included when enumerating files.</param>
|
||||||
IEnumerable<string> EnumerateFiles([NotNull] string path);
|
/// <returns>An enumerable collection of the full names (including paths) for the files in the directory (and optionally subdirectories) specified by path.</returns>
|
||||||
|
IEnumerable<string> EnumerateFiles([NotNull] string path, bool includeSubdirectories);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Read a static mapping file as text.
|
/// Read a static mapping file as text.
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using JetBrains.Annotations;
|
using System;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using WireMock.Admin.Requests;
|
using WireMock.Admin.Requests;
|
||||||
|
|
||||||
namespace WireMock.Logging
|
namespace WireMock.Logging
|
||||||
@@ -45,6 +46,15 @@ namespace WireMock.Logging
|
|||||||
[StringFormatMethod("formatString")]
|
[StringFormatMethod("formatString")]
|
||||||
void Error([NotNull] string formatString, [NotNull] params object[] args);
|
void Error([NotNull] string formatString, [NotNull] params object[] args);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Writes the message at the Error level using the specified exception.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="formatString">The format string.</param>
|
||||||
|
/// <param name="exception">The exception.</param>
|
||||||
|
[PublicAPI]
|
||||||
|
[StringFormatMethod("formatString")]
|
||||||
|
void Error([NotNull] string formatString, [NotNull] Exception exception);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Writes the LogEntryModel (LogRequestModel, LogResponseModel and more).
|
/// Writes the LogEntryModel (LogRequestModel, LogResponseModel and more).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace WireMock.Util
|
namespace WireMock.Types
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The BodyType
|
/// The BodyType
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace WireMock.Util
|
namespace WireMock.Types
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A special List which overrides the ToString() to return first value.
|
/// A special List which overrides the ToString() to return first value.
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Description>Commonly used interfaces, models, enumerations and types.</Description>
|
||||||
|
<AssemblyTitle>WireMock.Net.Abstractions</AssemblyTitle>
|
||||||
|
<Authors>Stef Heyenrath</Authors>
|
||||||
|
<TargetFrameworks>netstandard1.0;netstandard2.0;net45</TargetFrameworks>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<AssemblyName>WireMock.Net.Abstractions</AssemblyName>
|
||||||
|
<PackageId>WireMock.Net.Abstractions</PackageId>
|
||||||
|
<PackageTags>wiremock;interfaces;models;classes;enumerations;types</PackageTags>
|
||||||
|
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
||||||
|
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
|
||||||
|
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
|
||||||
|
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
|
<RootNamespace>WireMock</RootNamespace>
|
||||||
|
<!--<DebugType>full</DebugType>
|
||||||
|
<IncludeSource>True</IncludeSource>
|
||||||
|
<IncludeSymbols>True</IncludeSymbols>-->
|
||||||
|
<ProjectGuid>{B6269AAC-170A-4346-8B9A-579DED3D9A94}</ProjectGuid>
|
||||||
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
|
<CodeAnalysisRuleSet>../WireMock.Net/WireMock.Net.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<SignAssembly>true</SignAssembly>
|
||||||
|
<AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
|
||||||
|
<!--<DelaySign>true</DelaySign>-->
|
||||||
|
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
|
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>
|
||||||
|
<!--<GeneratePackageOnBuild>true</GeneratePackageOnBuild>-->
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -5,6 +5,7 @@ using System.Net.Http.Headers;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WireMock.Admin.Mappings;
|
using WireMock.Admin.Mappings;
|
||||||
using WireMock.Admin.Requests;
|
using WireMock.Admin.Requests;
|
||||||
|
using WireMock.Admin.Scenarios;
|
||||||
using WireMock.Admin.Settings;
|
using WireMock.Admin.Settings;
|
||||||
|
|
||||||
namespace WireMock.Client
|
namespace WireMock.Client
|
||||||
@@ -12,7 +13,8 @@ namespace WireMock.Client
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The RestEase interface which defines all admin commands.
|
/// The RestEase interface which defines all admin commands.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IFluentMockServerAdmin
|
[BasePath("__admin")]
|
||||||
|
public interface IWireMockAdminApi
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Authentication header
|
/// Authentication header
|
||||||
@@ -24,14 +26,14 @@ namespace WireMock.Client
|
|||||||
/// Get the settings.
|
/// Get the settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>SettingsModel</returns>
|
/// <returns>SettingsModel</returns>
|
||||||
[Get("__admin/settings")]
|
[Get("settings")]
|
||||||
Task<SettingsModel> GetSettingsAsync();
|
Task<SettingsModel> GetSettingsAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Update the settings.
|
/// Update the settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="settings">SettingsModel</param>
|
/// <param name="settings">SettingsModel</param>
|
||||||
[Put("__admin/settings")]
|
[Put("settings")]
|
||||||
[Header("Content-Type", "application/json")]
|
[Header("Content-Type", "application/json")]
|
||||||
Task<StatusModel> PutSettingsAsync([Body] SettingsModel settings);
|
Task<StatusModel> PutSettingsAsync([Body] SettingsModel settings);
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ namespace WireMock.Client
|
|||||||
/// Update the settings
|
/// Update the settings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="settings">SettingsModel</param>
|
/// <param name="settings">SettingsModel</param>
|
||||||
[Post("__admin/settings")]
|
[Post("settings")]
|
||||||
[Header("Content-Type", "application/json")]
|
[Header("Content-Type", "application/json")]
|
||||||
Task<StatusModel> PostSettingsAsync([Body] SettingsModel settings);
|
Task<StatusModel> PostSettingsAsync([Body] SettingsModel settings);
|
||||||
|
|
||||||
@@ -47,14 +49,14 @@ namespace WireMock.Client
|
|||||||
/// Get the mappings.
|
/// Get the mappings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>MappingModels</returns>
|
/// <returns>MappingModels</returns>
|
||||||
[Get("__admin/mappings")]
|
[Get("mappings")]
|
||||||
Task<IList<MappingModel>> GetMappingsAsync();
|
Task<IList<MappingModel>> GetMappingsAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a new mapping.
|
/// Add a new mapping.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mapping">MappingModel</param>
|
/// <param name="mapping">MappingModel</param>
|
||||||
[Post("__admin/mappings")]
|
[Post("mappings")]
|
||||||
[Header("Content-Type", "application/json")]
|
[Header("Content-Type", "application/json")]
|
||||||
Task<StatusModel> PostMappingAsync([Body] MappingModel mapping);
|
Task<StatusModel> PostMappingAsync([Body] MappingModel mapping);
|
||||||
|
|
||||||
@@ -62,28 +64,37 @@ namespace WireMock.Client
|
|||||||
/// Add new mappings.
|
/// Add new mappings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mappings">MappingModels</param>
|
/// <param name="mappings">MappingModels</param>
|
||||||
[Post("__admin/mappings")]
|
[Post("mappings")]
|
||||||
[Header("Content-Type", "application/json")]
|
[Header("Content-Type", "application/json")]
|
||||||
Task<StatusModel> PostMappingsAsync([Body] IList<MappingModel> mappings);
|
Task<StatusModel> PostMappingsAsync([Body] IList<MappingModel> mappings);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete all mappings.
|
/// Delete all mappings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Delete("__admin/mappings")]
|
[Delete("mappings")]
|
||||||
Task<StatusModel> DeleteMappingsAsync();
|
Task<StatusModel> DeleteMappingsAsync();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delete mappings according to GUIDs
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mappings">MappingModels</param>
|
||||||
|
[Delete("mappings")]
|
||||||
|
[Header("Content-Type", "application/json")]
|
||||||
|
Task<StatusModel> DeleteMappingsAsync([Body] IList<MappingModel> mappings);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete (reset) all mappings.
|
/// Delete (reset) all mappings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="reloadStaticMappings">A value indicating whether to reload the static mappings after the reset.</param>
|
||||||
[Post("__admin/mappings/reset")]
|
[Post("__admin/mappings/reset")]
|
||||||
Task<StatusModel> ResetMappingsAsync();
|
Task<StatusModel> ResetMappingsAsync(bool? reloadStaticMappings = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a mapping based on the guid
|
/// Get a mapping based on the guid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="guid">The Guid</param>
|
/// <param name="guid">The Guid</param>
|
||||||
/// <returns>MappingModel</returns>
|
/// <returns>MappingModel</returns>
|
||||||
[Get("__admin/mappings/{guid}")]
|
[Get("mappings/{guid}")]
|
||||||
Task<MappingModel> GetMappingAsync([Path] Guid guid);
|
Task<MappingModel> GetMappingAsync([Path] Guid guid);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -91,7 +102,7 @@ namespace WireMock.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="guid">The Guid</param>
|
/// <param name="guid">The Guid</param>
|
||||||
/// <param name="mapping">MappingModel</param>
|
/// <param name="mapping">MappingModel</param>
|
||||||
[Put("__admin/mappings/{guid}")]
|
[Put("mappings/{guid}")]
|
||||||
[Header("Content-Type", "application/json")]
|
[Header("Content-Type", "application/json")]
|
||||||
Task<StatusModel> PutMappingAsync([Path] Guid guid, [Body] MappingModel mapping);
|
Task<StatusModel> PutMappingAsync([Path] Guid guid, [Body] MappingModel mapping);
|
||||||
|
|
||||||
@@ -99,32 +110,32 @@ namespace WireMock.Client
|
|||||||
/// Delete a mapping based on the guid
|
/// Delete a mapping based on the guid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="guid">The Guid</param>
|
/// <param name="guid">The Guid</param>
|
||||||
[Delete("__admin/mappings/{guid}")]
|
[Delete("mappings/{guid}")]
|
||||||
Task<StatusModel> DeleteMappingAsync([Path] Guid guid);
|
Task<StatusModel> DeleteMappingAsync([Path] Guid guid);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Save the mappings
|
/// Save the mappings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Post("__admin/mappings/save")]
|
[Post("mappings/save")]
|
||||||
Task<StatusModel> SaveMappingAsync();
|
Task<StatusModel> SaveMappingAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the requests.
|
/// Get the requests.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>LogRequestModels</returns>
|
/// <returns>LogRequestModels</returns>
|
||||||
[Get("__admin/requests")]
|
[Get("requests")]
|
||||||
Task<IList<LogEntryModel>> GetRequestsAsync();
|
Task<IList<LogEntryModel>> GetRequestsAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete all requests.
|
/// Delete all requests.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Delete("__admin/requests")]
|
[Delete("requests")]
|
||||||
Task<StatusModel> DeleteRequestsAsync();
|
Task<StatusModel> DeleteRequestsAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete (reset) all requests.
|
/// Delete (reset) all requests.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Post("__admin/requests/reset")]
|
[Post("requests/reset")]
|
||||||
Task<StatusModel> ResetRequestsAsync();
|
Task<StatusModel> ResetRequestsAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -132,40 +143,40 @@ namespace WireMock.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="guid">The Guid</param>
|
/// <param name="guid">The Guid</param>
|
||||||
/// <returns>MappingModel</returns>
|
/// <returns>MappingModel</returns>
|
||||||
[Get("__admin/requests/{guid}")]
|
[Get("requests/{guid}")]
|
||||||
Task<LogEntryModel> GetRequestAsync([Path] Guid guid);
|
Task<LogEntryModel> GetRequestAsync([Path] Guid guid);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete a request based on the guid
|
/// Delete a request based on the guid
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="guid">The Guid</param>
|
/// <param name="guid">The Guid</param>
|
||||||
[Delete("__admin/requests/{guid}")]
|
[Delete("requests/{guid}")]
|
||||||
Task<StatusModel> DeleteRequestAsync([Path] Guid guid);
|
Task<StatusModel> DeleteRequestAsync([Path] Guid guid);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Find a request based on the criteria
|
/// Find a request based on the criteria
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="model">The RequestModel</param>
|
/// <param name="model">The RequestModel</param>
|
||||||
[Post("__admin/requests/find")]
|
[Post("requests/find")]
|
||||||
[Header("Content-Type", "application/json")]
|
[Header("Content-Type", "application/json")]
|
||||||
Task<IList<LogEntryModel>> FindRequestsAsync([Body] RequestModel model);
|
Task<IList<LogEntryModel>> FindRequestsAsync([Body] RequestModel model);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get all scenarios
|
/// Get all scenarios
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Get("__admin/scenarios")]
|
[Get("scenarios")]
|
||||||
Task<IList<ScenarioState>> GetScenariosAsync();
|
Task<IList<ScenarioStateModel>> GetScenariosAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete (reset) all scenarios
|
/// Delete (reset) all scenarios
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Delete("__admin/scenarios")]
|
[Delete("scenarios")]
|
||||||
Task<StatusModel> DeleteScenariosAsync();
|
Task<StatusModel> DeleteScenariosAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete (reset) all scenarios
|
/// Delete (reset) all scenarios
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Post("__admin/scenarios")]
|
[Post("scenarios")]
|
||||||
Task<StatusModel> ResetScenariosAsync();
|
Task<StatusModel> ResetScenariosAsync();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -173,7 +184,7 @@ namespace WireMock.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filename">The filename</param>
|
/// <param name="filename">The filename</param>
|
||||||
/// <param name="body">The body</param>
|
/// <param name="body">The body</param>
|
||||||
[Post("__admin/files/{filename}")]
|
[Post("files/{filename}")]
|
||||||
Task<StatusModel> PostFileAsync([Path] string filename, [Body] string body);
|
Task<StatusModel> PostFileAsync([Path] string filename, [Body] string body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -181,28 +192,28 @@ namespace WireMock.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filename">The filename</param>
|
/// <param name="filename">The filename</param>
|
||||||
/// <param name="body">The body</param>
|
/// <param name="body">The body</param>
|
||||||
[Put("__admin/files/{filename}")]
|
[Put("files/{filename}")]
|
||||||
Task<StatusModel> PutFileAsync([Path] string filename, [Body] string body);
|
Task<StatusModel> PutFileAsync([Path] string filename, [Body] string body);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get the content of an existing File
|
/// Get the content of an existing File
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filename">The filename</param>
|
/// <param name="filename">The filename</param>
|
||||||
[Get("__admin/files/{filename}")]
|
[Get("files/{filename}")]
|
||||||
Task<string> GetFileAsync([Path] string filename);
|
Task<string> GetFileAsync([Path] string filename);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete an existing File
|
/// Delete an existing File
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filename">The filename</param>
|
/// <param name="filename">The filename</param>
|
||||||
[Delete("__admin/files/{filename}")]
|
[Delete("files/{filename}")]
|
||||||
Task<StatusModel> DeleteFileAsync([Path] string filename);
|
Task<StatusModel> DeleteFileAsync([Path] string filename);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if a file exists
|
/// Check if a file exists
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filename">The filename</param>
|
/// <param name="filename">The filename</param>
|
||||||
[Head("__admin/files/{filename}")]
|
[Head("files/{filename}")]
|
||||||
Task FileExistsAsync([Path] string filename);
|
Task FileExistsAsync([Path] string filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
48
src/WireMock.Net.RestClient/WireMock.Net.RestClient.csproj
Normal file
48
src/WireMock.Net.RestClient/WireMock.Net.RestClient.csproj
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<Description>A RestClient using RestEase to access the admin interface.</Description>
|
||||||
|
<AssemblyTitle>WireMock.Net.RestClient</AssemblyTitle>
|
||||||
|
<Authors>Stef Heyenrath</Authors>
|
||||||
|
<TargetFrameworks>netstandard1.1;netstandard2.0;net45</TargetFrameworks>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<AssemblyName>WireMock.Net.RestClient</AssemblyName>
|
||||||
|
<PackageId>WireMock.Net.RestClient</PackageId>
|
||||||
|
<PackageTags>wiremock;rest;client;restclient;restease;rest;json</PackageTags>
|
||||||
|
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
||||||
|
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
|
||||||
|
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
||||||
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
|
||||||
|
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
|
<RootNamespace>WireMock.Client</RootNamespace>
|
||||||
|
<!--<DebugType>full</DebugType>
|
||||||
|
<IncludeSource>True</IncludeSource>
|
||||||
|
<IncludeSymbols>True</IncludeSymbols>-->
|
||||||
|
<ProjectGuid>{B6269AAC-170A-43D6-8B9A-579DED3D9A96}</ProjectGuid>
|
||||||
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
|
<CodeAnalysisRuleSet>../WireMock.Net/WireMock.Net.ruleset</CodeAnalysisRuleSet>
|
||||||
|
<SignAssembly>true</SignAssembly>
|
||||||
|
<AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
|
||||||
|
<!--<DelaySign>true</DelaySign>-->
|
||||||
|
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
|
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="RestEase" Version="1.4.10" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\WireMock.Net.Abstractions\WireMock.Net.Abstractions.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Linq;
|
using JetBrains.Annotations;
|
||||||
|
using System.Linq;
|
||||||
|
using WireMock.Logging;
|
||||||
using WireMock.Server;
|
using WireMock.Server;
|
||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using WireMock.Logging;
|
|
||||||
|
|
||||||
namespace WireMock.Net.StandAlone
|
namespace WireMock.Net.StandAlone
|
||||||
{
|
{
|
||||||
@@ -17,13 +17,13 @@ namespace WireMock.Net.StandAlone
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="settings">The FluentMockServerSettings</param>
|
/// <param name="settings">The FluentMockServerSettings</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static FluentMockServer Start([NotNull] IFluentMockServerSettings settings)
|
public static WireMockServer Start([NotNull] IWireMockServerSettings settings)
|
||||||
{
|
{
|
||||||
Check.NotNull(settings, nameof(settings));
|
Check.NotNull(settings, nameof(settings));
|
||||||
|
|
||||||
var server = FluentMockServer.Start(settings);
|
var server = WireMockServer.Start(settings);
|
||||||
|
|
||||||
settings.Logger.Info("WireMock.Net server listening at {0}", string.Join(",", server.Urls));
|
settings.Logger?.Info("WireMock.Net server listening at {0}", string.Join(",", server.Urls));
|
||||||
|
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
@@ -34,59 +34,13 @@ namespace WireMock.Net.StandAlone
|
|||||||
/// <param name="args">The commandline arguments</param>
|
/// <param name="args">The commandline arguments</param>
|
||||||
/// <param name="logger">The logger</param>
|
/// <param name="logger">The logger</param>
|
||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static FluentMockServer Start([NotNull] string[] args, [CanBeNull] IWireMockLogger logger = null)
|
public static WireMockServer Start([NotNull] string[] args, [CanBeNull] IWireMockLogger logger = null)
|
||||||
{
|
{
|
||||||
Check.NotNull(args, nameof(args));
|
Check.NotNull(args, nameof(args));
|
||||||
|
|
||||||
var parser = new SimpleCommandLineParser();
|
var settings = WireMockServerSettingsParser.ParseArguments(args, logger);
|
||||||
parser.Parse(args);
|
|
||||||
|
|
||||||
var settings = new FluentMockServerSettings
|
settings.Logger?.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
||||||
{
|
|
||||||
StartAdminInterface = parser.GetBoolValue("StartAdminInterface", true),
|
|
||||||
ReadStaticMappings = parser.GetBoolValue("ReadStaticMappings"),
|
|
||||||
WatchStaticMappings = parser.GetBoolValue("WatchStaticMappings"),
|
|
||||||
AllowPartialMapping = parser.GetBoolValue("AllowPartialMapping", false),
|
|
||||||
AdminUsername = parser.GetStringValue("AdminUsername"),
|
|
||||||
AdminPassword = parser.GetStringValue("AdminPassword"),
|
|
||||||
MaxRequestLogCount = parser.GetIntValue("MaxRequestLogCount"),
|
|
||||||
RequestLogExpirationDuration = parser.GetIntValue("RequestLogExpirationDuration")
|
|
||||||
};
|
|
||||||
|
|
||||||
if (logger != null)
|
|
||||||
{
|
|
||||||
settings.Logger = logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.GetStringValue("WireMockLogger") == "WireMockConsoleLogger")
|
|
||||||
{
|
|
||||||
settings.Logger = new WireMockConsoleLogger();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.Contains("Port"))
|
|
||||||
{
|
|
||||||
settings.Port = parser.GetIntValue("Port");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
settings.Urls = parser.GetValues("Urls", new[] { "http://*:9091/" });
|
|
||||||
}
|
|
||||||
|
|
||||||
string proxyURL = parser.GetStringValue("ProxyURL");
|
|
||||||
if (!string.IsNullOrEmpty(proxyURL))
|
|
||||||
{
|
|
||||||
settings.ProxyAndRecordSettings = new ProxyAndRecordSettings
|
|
||||||
{
|
|
||||||
Url = proxyURL,
|
|
||||||
SaveMapping = parser.GetBoolValue("SaveMapping"),
|
|
||||||
SaveMappingToFile = parser.GetBoolValue("SaveMappingToFile"),
|
|
||||||
ClientX509Certificate2ThumbprintOrSubjectName = parser.GetStringValue("ClientX509Certificate2ThumbprintOrSubjectName"),
|
|
||||||
BlackListedHeaders = parser.GetValues("BlackListedHeaders"),
|
|
||||||
BlackListedCookies = parser.GetValues("BlackListedCookies")
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.Logger.Debug("WireMock.Net server arguments [{0}]", string.Join(", ", args.Select(a => $"'{a}'")));
|
|
||||||
|
|
||||||
return Start(settings);
|
return Start(settings);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,60 +1,60 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Lightweight StandAlone Http Mocking Server for .Net.</Description>
|
<Description>Lightweight StandAlone Http Mocking Server for .Net.</Description>
|
||||||
<AssemblyTitle>WireMock.Net.StandAlone</AssemblyTitle>
|
<AssemblyTitle>WireMock.Net.StandAlone</AssemblyTitle>
|
||||||
<Authors>Stef Heyenrath</Authors>
|
<Authors>Stef Heyenrath</Authors>
|
||||||
<TargetFrameworks>net451;net452;net46;netstandard1.3;netstandard2.0</TargetFrameworks>
|
<TargetFrameworks>net451;net452;net46;net461;netstandard1.3;netstandard2.0</TargetFrameworks>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<AssemblyName>WireMock.Net.StandAlone</AssemblyName>
|
<AssemblyName>WireMock.Net.StandAlone</AssemblyName>
|
||||||
<PackageId>WireMock.Net.StandAlone</PackageId>
|
<PackageId>WireMock.Net.StandAlone</PackageId>
|
||||||
<PackageTags>tdd;mock;http;wiremock;test;server;unittest</PackageTags>
|
<PackageTags>tdd;mock;http;wiremock;test;server;unittest</PackageTags>
|
||||||
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
|
||||||
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
|
<PackageIconUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/WireMock.Net-Logo.png</PackageIconUrl>
|
||||||
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/WireMock-Net/WireMock.Net</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://raw.githubusercontent.com/WireMock-Net/WireMock.Net/master/LICENSE</PackageLicenseUrl>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
|
<RepositoryUrl>https://github.com/WireMock-Net/WireMock.Net</RepositoryUrl>
|
||||||
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
<ApplicationIcon>../../WireMock.Net-Logo.ico</ApplicationIcon>
|
||||||
<RootNamespace>WireMock.Net.StandAlone</RootNamespace>
|
<RootNamespace>WireMock.Net.StandAlone</RootNamespace>
|
||||||
<DebugType>full</DebugType>
|
<!--<DebugType>full</DebugType>
|
||||||
<IncludeSource>True</IncludeSource>
|
<IncludeSource>True</IncludeSource>
|
||||||
<IncludeSymbols>True</IncludeSymbols>
|
<IncludeSymbols>True</IncludeSymbols>-->
|
||||||
<ProjectGuid>{B6269AAC-170A-43D5-8B9A-579DED3D9A95}</ProjectGuid>
|
<ProjectGuid>{B6269AAC-170A-43D5-8B9A-579DED3D9A95}</ProjectGuid>
|
||||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||||
<CodeAnalysisRuleSet>WireMock.Net.StandAlone.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>WireMock.Net.StandAlone.ruleset</CodeAnalysisRuleSet>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
|
||||||
<!--<DelaySign>true</DelaySign>-->
|
<!--<DelaySign>true</DelaySign>-->
|
||||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>
|
<PathMap>$(MSBuildProjectDirectory)=/</PathMap>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'netstandard2.0' ">
|
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'netstandard2.0' ">
|
||||||
<DefineConstants>NETSTANDARD;USE_ASPNETCORE</DefineConstants>
|
<DefineConstants>NETSTANDARD;USE_ASPNETCORE</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net461'">
|
||||||
<DefineConstants>USE_ASPNETCORE;NET46</DefineConstants>
|
<DefineConstants>USE_ASPNETCORE;NET46</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1">
|
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1">
|
||||||
<PrivateAssets>All</PrivateAssets>
|
<PrivateAssets>All</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="SonarAnalyzer.CSharp" Version="7.8.0.7320">
|
<PackageReference Include="SonarAnalyzer.CSharp" Version="7.8.0.7320">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
<ProjectReference Include="..\WireMock.Net\WireMock.Net.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
28
src/WireMock.Net/Compatibility/WebProxy.cs
Normal file
28
src/WireMock.Net/Compatibility/WebProxy.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#if NETSTANDARD1_3
|
||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace System.Net
|
||||||
|
{
|
||||||
|
internal class WebProxy : IWebProxy
|
||||||
|
{
|
||||||
|
private readonly string _proxy;
|
||||||
|
public ICredentials Credentials { get; set; }
|
||||||
|
|
||||||
|
public WebProxy(string proxy)
|
||||||
|
{
|
||||||
|
_proxy = proxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Uri GetProxy(Uri destination)
|
||||||
|
{
|
||||||
|
return new Uri(_proxy);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsBypassed(Uri host)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using WireMock.Util;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Handlers
|
namespace WireMock.Handlers
|
||||||
@@ -46,11 +47,11 @@ namespace WireMock.Handlers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.EnumerateFiles"/>
|
/// <inheritdoc cref="IFileSystemHandler.EnumerateFiles"/>
|
||||||
public IEnumerable<string> EnumerateFiles(string path)
|
public IEnumerable<string> EnumerateFiles(string path, bool includeSubdirectories)
|
||||||
{
|
{
|
||||||
Check.NotNullOrEmpty(path, nameof(path));
|
Check.NotNullOrEmpty(path, nameof(path));
|
||||||
|
|
||||||
return Directory.EnumerateFiles(path);
|
return includeSubdirectories ? Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories) : Directory.EnumerateFiles(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.GetMappingFolder"/>
|
/// <inheritdoc cref="IFileSystemHandler.GetMappingFolder"/>
|
||||||
@@ -80,20 +81,20 @@ namespace WireMock.Handlers
|
|||||||
public byte[] ReadResponseBodyAsFile(string path)
|
public byte[] ReadResponseBodyAsFile(string path)
|
||||||
{
|
{
|
||||||
Check.NotNullOrEmpty(path, nameof(path));
|
Check.NotNullOrEmpty(path, nameof(path));
|
||||||
|
path = PathUtils.CleanPath(path);
|
||||||
// In case the path is a filename, the path will be adjusted to the MappingFolder.
|
// If the file exists at the given path relative to the MappingsFolder, then return that.
|
||||||
// Else the path will just be as-is.
|
// Else the path will just be as-is.
|
||||||
return File.ReadAllBytes(Path.GetFileName(path) == path ? Path.Combine(GetMappingFolder(), path) : path);
|
return File.ReadAllBytes(File.Exists(PathUtils.Combine(GetMappingFolder(), path)) ? PathUtils.Combine(GetMappingFolder(), path) : path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.ReadResponseBodyAsString"/>
|
/// <inheritdoc cref="IFileSystemHandler.ReadResponseBodyAsString"/>
|
||||||
public string ReadResponseBodyAsString(string path)
|
public string ReadResponseBodyAsString(string path)
|
||||||
{
|
{
|
||||||
Check.NotNullOrEmpty(path, nameof(path));
|
Check.NotNullOrEmpty(path, nameof(path));
|
||||||
|
path = PathUtils.CleanPath(path);
|
||||||
// In case the path is a filename, the path will be adjusted to the MappingFolder.
|
// In case the path is a filename, the path will be adjusted to the MappingFolder.
|
||||||
// Else the path will just be as-is.
|
// Else the path will just be as-is.
|
||||||
return File.ReadAllText(Path.GetFileName(path) == path ? Path.Combine(GetMappingFolder(), path) : path);
|
return File.ReadAllText(File.Exists(PathUtils.Combine(GetMappingFolder(), path)) ? PathUtils.Combine(GetMappingFolder(), path) : path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IFileSystemHandler.FileExists"/>
|
/// <inheritdoc cref="IFileSystemHandler.FileExists"/>
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
using System;
|
using JetBrains.Annotations;
|
||||||
|
using System;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using WireMock.HttpsCertificate;
|
using WireMock.HttpsCertificate;
|
||||||
|
using WireMock.Settings;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Http
|
namespace WireMock.Http
|
||||||
{
|
{
|
||||||
internal static class HttpClientHelper
|
internal static class HttpClientHelper
|
||||||
{
|
{
|
||||||
public static HttpClient CreateHttpClient(string clientX509Certificate2ThumbprintOrSubjectName = null)
|
public static HttpClient CreateHttpClient(IProxyAndRecordSettings settings)
|
||||||
{
|
{
|
||||||
#if NETSTANDARD
|
#if NETSTANDARD
|
||||||
var handler = new HttpClientHandler
|
var handler = new HttpClientHandler
|
||||||
@@ -36,20 +37,30 @@ namespace WireMock.Http
|
|||||||
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
|
ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(clientX509Certificate2ThumbprintOrSubjectName))
|
if (!string.IsNullOrEmpty(settings.ClientX509Certificate2ThumbprintOrSubjectName))
|
||||||
{
|
{
|
||||||
handler.ClientCertificateOptions = ClientCertificateOption.Manual;
|
handler.ClientCertificateOptions = ClientCertificateOption.Manual;
|
||||||
|
|
||||||
var x509Certificate2 = ClientCertificateHelper.GetCertificate(clientX509Certificate2ThumbprintOrSubjectName);
|
var x509Certificate2 = ClientCertificateHelper.GetCertificate(settings.ClientX509Certificate2ThumbprintOrSubjectName);
|
||||||
handler.ClientCertificates.Add(x509Certificate2);
|
handler.ClientCertificates.Add(x509Certificate2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For proxy we shouldn't follow auto redirects
|
handler.AllowAutoRedirect = settings.AllowAutoRedirect == true;
|
||||||
handler.AllowAutoRedirect = false;
|
|
||||||
|
|
||||||
// If UseCookies enabled, httpClient ignores Cookie header
|
// If UseCookies enabled, httpClient ignores Cookie header
|
||||||
handler.UseCookies = false;
|
handler.UseCookies = false;
|
||||||
|
|
||||||
|
if (settings.WebProxySettings != null)
|
||||||
|
{
|
||||||
|
handler.UseProxy = true;
|
||||||
|
|
||||||
|
handler.Proxy = new WebProxy(settings.WebProxySettings.Address);
|
||||||
|
if (settings.WebProxySettings.UserName != null && settings.WebProxySettings.Password != null)
|
||||||
|
{
|
||||||
|
handler.Proxy.Credentials = new NetworkCredential(settings.WebProxySettings.UserName, settings.WebProxySettings.Password);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var client = new HttpClient(handler);
|
var client = new HttpClient(handler);
|
||||||
#if NET452 || NET46
|
#if NET452 || NET46
|
||||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
|
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using JetBrains.Annotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using JetBrains.Annotations;
|
using WireMock.Types;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using WireMock.Util;
|
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Http
|
namespace WireMock.Http
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ using System.Security.Cryptography.X509Certificates;
|
|||||||
|
|
||||||
namespace WireMock.HttpsCertificate
|
namespace WireMock.HttpsCertificate
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Only used for NetStandard 1.3
|
||||||
|
/// </summary>
|
||||||
internal static class PublicCertificateHelper
|
internal static class PublicCertificateHelper
|
||||||
{
|
{
|
||||||
// 1] Generate using https://www.pluralsight.com/blog/software-development/selfcert-create-a-self-signed-certificate-interactively-gui-or-programmatically-in-net
|
// 1] Generate using https://www.pluralsight.com/blog/software-development/selfcert-create-a-self-signed-certificate-interactively-gui-or-programmatically-in-net
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ namespace WireMock
|
|||||||
IResponseProvider Provider { get; }
|
IResponseProvider Provider { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The FluentMockServerSettings.
|
/// The WireMockServerSettings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IFluentMockServerSettings Settings { get; }
|
IWireMockServerSettings Settings { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is State started ?
|
/// Is State started ?
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using WireMock.Admin.Requests;
|
using WireMock.Admin.Requests;
|
||||||
|
|
||||||
namespace WireMock.Logging
|
namespace WireMock.Logging
|
||||||
@@ -36,12 +36,27 @@ namespace WireMock.Logging
|
|||||||
Console.WriteLine(Format("Warn", formatString, args));
|
Console.WriteLine(Format("Warn", formatString, args));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <see cref="IWireMockLogger.Error"/>
|
/// <see cref="IWireMockLogger.Error(string, object[])"/>
|
||||||
public void Error(string formatString, params object[] args)
|
public void Error(string formatString, params object[] args)
|
||||||
{
|
{
|
||||||
Console.WriteLine(Format("Error", formatString, args));
|
Console.WriteLine(Format("Error", formatString, args));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <see cref="IWireMockLogger.Error(string, Exception)"/>
|
||||||
|
public void Error(string formatString, Exception exception)
|
||||||
|
{
|
||||||
|
Console.WriteLine(Format("Error", formatString, exception.Message));
|
||||||
|
|
||||||
|
if (exception is AggregateException ae)
|
||||||
|
{
|
||||||
|
ae.Handle(ex =>
|
||||||
|
{
|
||||||
|
Console.WriteLine(Format("Error", "Exception {0}", exception.Message));
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <see cref="IWireMockLogger.DebugRequestResponse"/>
|
/// <see cref="IWireMockLogger.DebugRequestResponse"/>
|
||||||
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using WireMock.Admin.Requests;
|
using System;
|
||||||
|
using WireMock.Admin.Requests;
|
||||||
|
|
||||||
namespace WireMock.Logging
|
namespace WireMock.Logging
|
||||||
{
|
{
|
||||||
@@ -26,12 +27,18 @@ namespace WireMock.Logging
|
|||||||
// Log nothing
|
// Log nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <see cref="IWireMockLogger.Error"/>
|
/// <see cref="IWireMockLogger.Error(string, object[])"/>
|
||||||
public void Error(string formatString, params object[] args)
|
public void Error(string formatString, params object[] args)
|
||||||
{
|
{
|
||||||
// Log nothing
|
// Log nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <see cref="IWireMockLogger.Error(string, Exception)"/>
|
||||||
|
public void Error(string formatString, Exception exception)
|
||||||
|
{
|
||||||
|
// Log nothing
|
||||||
|
}
|
||||||
|
|
||||||
/// <see cref="IWireMockLogger.DebugRequestResponse"/>
|
/// <see cref="IWireMockLogger.DebugRequestResponse"/>
|
||||||
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using JetBrains.Annotations;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using WireMock.Matchers.Request;
|
using WireMock.Matchers.Request;
|
||||||
using WireMock.ResponseProviders;
|
using WireMock.ResponseProviders;
|
||||||
using WireMock.Settings;
|
using WireMock.Settings;
|
||||||
@@ -40,7 +40,7 @@ namespace WireMock
|
|||||||
public IResponseProvider Provider { get; }
|
public IResponseProvider Provider { get; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IMapping.Settings" />
|
/// <inheritdoc cref="IMapping.Settings" />
|
||||||
public IFluentMockServerSettings Settings { get; }
|
public IWireMockServerSettings Settings { get; }
|
||||||
|
|
||||||
/// <inheritdoc cref="IMapping.IsStartState" />
|
/// <inheritdoc cref="IMapping.IsStartState" />
|
||||||
public bool IsStartState => Scenario == null || Scenario != null && NextState != null && ExecutionConditionState == null;
|
public bool IsStartState => Scenario == null || Scenario != null && NextState != null && ExecutionConditionState == null;
|
||||||
@@ -57,7 +57,7 @@ namespace WireMock
|
|||||||
/// <param name="guid">The unique identifier.</param>
|
/// <param name="guid">The unique identifier.</param>
|
||||||
/// <param name="title">The unique title (can be null).</param>
|
/// <param name="title">The unique title (can be null).</param>
|
||||||
/// <param name="path">The full file path from this mapping title (can be null).</param>
|
/// <param name="path">The full file path from this mapping title (can be null).</param>
|
||||||
/// <param name="settings">The FluentMockServerSettings.</param>
|
/// <param name="settings">The WireMockServerSettings.</param>
|
||||||
/// <param name="requestMatcher">The request matcher.</param>
|
/// <param name="requestMatcher">The request matcher.</param>
|
||||||
/// <param name="provider">The provider.</param>
|
/// <param name="provider">The provider.</param>
|
||||||
/// <param name="priority">The priority for this mapping.</param>
|
/// <param name="priority">The priority for this mapping.</param>
|
||||||
@@ -65,7 +65,7 @@ namespace WireMock
|
|||||||
/// <param name="executionConditionState">State in which the current mapping can occur. [Optional]</param>
|
/// <param name="executionConditionState">State in which the current mapping can occur. [Optional]</param>
|
||||||
/// <param name="nextState">The next state which will occur after the current mapping execution. [Optional]</param>
|
/// <param name="nextState">The next state which will occur after the current mapping execution. [Optional]</param>
|
||||||
public Mapping(Guid guid, [CanBeNull] string title, [CanBeNull] string path,
|
public Mapping(Guid guid, [CanBeNull] string title, [CanBeNull] string path,
|
||||||
[NotNull] IFluentMockServerSettings settings, [NotNull] IRequestMatcher requestMatcher, [NotNull] IResponseProvider provider,
|
[NotNull] IWireMockServerSettings settings, [NotNull] IRequestMatcher requestMatcher, [NotNull] IResponseProvider provider,
|
||||||
int priority, [CanBeNull] string scenario, [CanBeNull] string executionConditionState, [CanBeNull] string nextState)
|
int priority, [CanBeNull] string scenario, [CanBeNull] string executionConditionState, [CanBeNull] string nextState)
|
||||||
{
|
{
|
||||||
Guid = guid;
|
Guid = guid;
|
||||||
|
|||||||
197
src/WireMock.Net/Matchers/CSharpCodeMatcher.cs
Normal file
197
src/WireMock.Net/Matchers/CSharpCodeMatcher.cs
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using WireMock.Exceptions;
|
||||||
|
using WireMock.Validation;
|
||||||
|
|
||||||
|
namespace WireMock.Matchers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// CSharpCode / CS-Script Matcher
|
||||||
|
/// </summary>
|
||||||
|
/// <inheritdoc cref="IObjectMatcher"/>
|
||||||
|
/// <inheritdoc cref="IStringMatcher"/>
|
||||||
|
internal class CSharpCodeMatcher : IObjectMatcher, IStringMatcher
|
||||||
|
{
|
||||||
|
private const string TemplateForIsMatchWithString = "{0} public class CodeHelper {{ public bool IsMatch(string it) {{ {1} }} }}";
|
||||||
|
|
||||||
|
private const string TemplateForIsMatchWithDynamic = "{0} public class CodeHelper {{ public bool IsMatch(dynamic it) {{ {1} }} }}";
|
||||||
|
|
||||||
|
private readonly string[] _usings =
|
||||||
|
{
|
||||||
|
"System",
|
||||||
|
"System.Linq",
|
||||||
|
"System.Collections.Generic",
|
||||||
|
"Microsoft.CSharp",
|
||||||
|
"Newtonsoft.Json.Linq"
|
||||||
|
};
|
||||||
|
|
||||||
|
public MatchBehaviour MatchBehaviour { get; }
|
||||||
|
|
||||||
|
private readonly string[] _patterns;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CSharpCodeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="patterns">The patterns.</param>
|
||||||
|
public CSharpCodeMatcher([NotNull] params string[] patterns) : this(MatchBehaviour.AcceptOnMatch, patterns)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CSharpCodeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
|
/// <param name="patterns">The patterns.</param>
|
||||||
|
public CSharpCodeMatcher(MatchBehaviour matchBehaviour, [NotNull] params string[] patterns)
|
||||||
|
{
|
||||||
|
Check.NotNull(patterns, nameof(patterns));
|
||||||
|
|
||||||
|
MatchBehaviour = matchBehaviour;
|
||||||
|
_patterns = patterns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double IsMatch(string input)
|
||||||
|
{
|
||||||
|
return IsMatchInternal(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double IsMatch(object input)
|
||||||
|
{
|
||||||
|
return IsMatchInternal(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double IsMatchInternal(object input)
|
||||||
|
{
|
||||||
|
double match = MatchScores.Mismatch;
|
||||||
|
|
||||||
|
if (input != null)
|
||||||
|
{
|
||||||
|
match = MatchScores.ToScore(_patterns.Select(pattern => IsMatch(input, pattern)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return MatchBehaviourHelper.Convert(MatchBehaviour, match);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsMatch(dynamic input, string pattern)
|
||||||
|
{
|
||||||
|
bool isMatchWithString = input is string;
|
||||||
|
var inputValue = isMatchWithString ? input : JObject.FromObject(input);
|
||||||
|
string source = GetSourceForIsMatchWithString(pattern, isMatchWithString);
|
||||||
|
|
||||||
|
object result = null;
|
||||||
|
|
||||||
|
#if NET451 || NET452
|
||||||
|
var compilerParams = new System.CodeDom.Compiler.CompilerParameters
|
||||||
|
{
|
||||||
|
GenerateInMemory = true,
|
||||||
|
GenerateExecutable = false,
|
||||||
|
ReferencedAssemblies =
|
||||||
|
{
|
||||||
|
"System.dll",
|
||||||
|
"System.Core.dll",
|
||||||
|
"Microsoft.CSharp.dll",
|
||||||
|
"Newtonsoft.Json.dll"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
using (var codeProvider = new Microsoft.CSharp.CSharpCodeProvider())
|
||||||
|
{
|
||||||
|
var compilerResults = codeProvider.CompileAssemblyFromSource(compilerParams, source);
|
||||||
|
|
||||||
|
if (compilerResults.Errors.Count != 0)
|
||||||
|
{
|
||||||
|
var errors = from System.CodeDom.Compiler.CompilerError er in compilerResults.Errors select er.ToString();
|
||||||
|
throw new WireMockException(string.Join(", ", errors));
|
||||||
|
}
|
||||||
|
|
||||||
|
object helper = compilerResults.CompiledAssembly.CreateInstance("CodeHelper");
|
||||||
|
if (helper == null)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to create instance from WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
|
||||||
|
var methodInfo = helper.GetType().GetMethod("IsMatch");
|
||||||
|
if (methodInfo == null)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to find method 'IsMatch' in WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = methodInfo.Invoke(helper, new[] { inputValue });
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to call method 'IsMatch' in WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#elif NET46 || NET461
|
||||||
|
dynamic script;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
script = CSScriptLibrary.CSScript.Evaluator.CompileCode(source).CreateObject("*");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to create compiler for WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = script.IsMatch(inputValue);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
#elif NETSTANDARD2_0
|
||||||
|
dynamic script;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var assembly = CSScriptLib.CSScript.Evaluator.CompileCode(source);
|
||||||
|
script = csscript.GenericExtensions.CreateObject(assembly, "*");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Unable to compile code for WireMock.CodeHelper", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
result = script.IsMatch(inputValue);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new WireMockException("CSharpCodeMatcher: Problem calling method 'IsMatch' in WireMock.CodeHelper");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
throw new NotSupportedException("The 'CSharpCodeMatcher' cannot be used in netstandard 1.3");
|
||||||
|
#endif
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return (bool)result;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new WireMockException($"Unable to cast result '{result}' to bool");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetSourceForIsMatchWithString(string pattern, bool isMatchWithString)
|
||||||
|
{
|
||||||
|
string template = isMatchWithString ? TemplateForIsMatchWithString : TemplateForIsMatchWithDynamic;
|
||||||
|
return string.Format(template, string.Join(Environment.NewLine, _usings.Select(u => $"using {u};")), pattern);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
||||||
|
public string[] GetPatterns()
|
||||||
|
{
|
||||||
|
return _patterns;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="IMatcher.Name"/>
|
||||||
|
public string Name => "CSharpCodeMatcher";
|
||||||
|
}
|
||||||
|
}
|
||||||
73
src/WireMock.Net/Matchers/ContentTypeMatcher.cs
Normal file
73
src/WireMock.Net/Matchers/ContentTypeMatcher.cs
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
using System.Net.Http.Headers;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
|
namespace WireMock.Matchers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ContentTypeMatcher which accepts also all charsets
|
||||||
|
/// </summary>
|
||||||
|
/// <seealso cref="RegexMatcher" />
|
||||||
|
public class ContentTypeMatcher : WildcardMatcher
|
||||||
|
{
|
||||||
|
private readonly string[] _patterns;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentTypeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pattern">The pattern.</param>
|
||||||
|
/// <param name="ignoreCase">IgnoreCase (default false)</param>
|
||||||
|
public ContentTypeMatcher([NotNull] string pattern, bool ignoreCase = false) : this(new[] { pattern }, ignoreCase)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentTypeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
|
/// <param name="pattern">The pattern.</param>
|
||||||
|
/// <param name="ignoreCase">IgnoreCase (default false)</param>
|
||||||
|
public ContentTypeMatcher(MatchBehaviour matchBehaviour, [NotNull] string pattern, bool ignoreCase = false) : this(matchBehaviour, new[] { pattern }, ignoreCase)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentTypeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="patterns">The patterns.</param>
|
||||||
|
/// <param name="ignoreCase">IgnoreCase (default false)</param>
|
||||||
|
public ContentTypeMatcher([NotNull] string[] patterns, bool ignoreCase = false) : this(MatchBehaviour.AcceptOnMatch, patterns, ignoreCase)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ContentTypeMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
|
/// <param name="patterns">The patterns.</param>
|
||||||
|
/// <param name="ignoreCase">IgnoreCase (default false)</param>
|
||||||
|
public ContentTypeMatcher(MatchBehaviour matchBehaviour, [NotNull] string[] patterns, bool ignoreCase = false) : base(matchBehaviour, patterns, ignoreCase)
|
||||||
|
{
|
||||||
|
_patterns = patterns;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="RegexMatcher.IsMatch"/>
|
||||||
|
public override double IsMatch(string input)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(input) || !MediaTypeHeaderValue.TryParse(input, out MediaTypeHeaderValue contentType))
|
||||||
|
{
|
||||||
|
return MatchBehaviourHelper.Convert(MatchBehaviour, MatchScores.Mismatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.IsMatch(contentType.MediaType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
||||||
|
public override string[] GetPatterns()
|
||||||
|
{
|
||||||
|
return _patterns;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc cref="IMatcher.Name"/>
|
||||||
|
public override string Name => "ContentTypeMatcher";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -93,10 +93,7 @@ namespace WireMock.Matchers
|
|||||||
|
|
||||||
private double IsMatch(JToken jtoken)
|
private double IsMatch(JToken jtoken)
|
||||||
{
|
{
|
||||||
// Wrap in array if needed
|
return MatchScores.ToScore(_patterns.Select(pattern => jtoken.SelectToken(pattern) != null));
|
||||||
JToken tokenOrArray = jtoken is JArray ? jtoken : new JArray(jtoken);
|
|
||||||
|
|
||||||
return MatchScores.ToScore(_patterns.Select(pattern => tokenOrArray.SelectToken(pattern) != null));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
using System.Linq;
|
using JetBrains.Annotations;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Linq;
|
||||||
|
using WireMock.Util;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Matchers
|
namespace WireMock.Matchers
|
||||||
@@ -84,7 +86,7 @@ namespace WireMock.Matchers
|
|||||||
// Check if JToken or object
|
// Check if JToken or object
|
||||||
JToken jtokenInput = input is JToken tokenInput ? tokenInput : JObject.FromObject(input);
|
JToken jtokenInput = input is JToken tokenInput ? tokenInput : JObject.FromObject(input);
|
||||||
|
|
||||||
// Check if JToken or string or object
|
// Check if JToken, string, IEnumerable or object
|
||||||
JToken jtokenValue;
|
JToken jtokenValue;
|
||||||
switch (Value)
|
switch (Value)
|
||||||
{
|
{
|
||||||
@@ -93,7 +95,11 @@ namespace WireMock.Matchers
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case string stringValue:
|
case string stringValue:
|
||||||
jtokenValue = JToken.Parse(stringValue);
|
jtokenValue = JsonUtils.Parse(stringValue);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case IEnumerable enumerableValue:
|
||||||
|
jtokenValue = JArray.FromObject(enumerableValue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ namespace WireMock.Matchers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// System.Linq.Dynamic.Core Expression Matcher
|
/// System.Linq.Dynamic.Core Expression Matcher
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <inheritdoc cref="IObjectMatcher"/>
|
||||||
/// <inheritdoc cref="IStringMatcher"/>
|
/// <inheritdoc cref="IStringMatcher"/>
|
||||||
public class LinqMatcher : IStringMatcher
|
public class LinqMatcher : IObjectMatcher, IStringMatcher
|
||||||
{
|
{
|
||||||
private readonly string[] _patterns;
|
private readonly string[] _patterns;
|
||||||
|
|
||||||
@@ -117,7 +118,6 @@ namespace WireMock.Matchers
|
|||||||
}
|
}
|
||||||
|
|
||||||
return MatchBehaviourHelper.Convert(MatchBehaviour, match);
|
return MatchBehaviourHelper.Convert(MatchBehaviour, match);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
/// <inheritdoc cref="IStringMatcher.GetPatterns"/>
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ namespace WireMock.Matchers
|
|||||||
IgnoreCase = ignoreCase;
|
IgnoreCase = ignoreCase;
|
||||||
MatchBehaviour = matchBehaviour;
|
MatchBehaviour = matchBehaviour;
|
||||||
|
|
||||||
RegexOptions options = RegexOptions.Compiled;
|
RegexOptions options = RegexOptions.Compiled | RegexOptions.Multiline;
|
||||||
|
|
||||||
if (ignoreCase)
|
if (ignoreCase)
|
||||||
{
|
{
|
||||||
options |= RegexOptions.IgnoreCase;
|
options |= RegexOptions.IgnoreCase;
|
||||||
@@ -71,7 +72,7 @@ namespace WireMock.Matchers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IStringMatcher.IsMatch"/>
|
/// <inheritdoc cref="IStringMatcher.IsMatch"/>
|
||||||
public double IsMatch(string input)
|
public virtual double IsMatch(string input)
|
||||||
{
|
{
|
||||||
double match = MatchScores.Mismatch;
|
double match = MatchScores.Mismatch;
|
||||||
if (input != null)
|
if (input != null)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using WireMock.Util;
|
using WireMock.Types;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Matchers.Request
|
namespace WireMock.Matchers.Request
|
||||||
|
|||||||
@@ -9,14 +9,15 @@ namespace WireMock.Matchers.Request
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The request cookie matcher.
|
/// The request cookie matcher.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <inheritdoc cref="IRequestMatcher"/>
|
||||||
public class RequestMessageCookieMatcher : IRequestMatcher
|
public class RequestMessageCookieMatcher : IRequestMatcher
|
||||||
{
|
{
|
||||||
private readonly MatchBehaviour _matchBehaviour;
|
private readonly MatchBehaviour _matchBehaviour;
|
||||||
private readonly bool _ignoreCase;
|
private readonly bool _ignoreCase;
|
||||||
|
|
||||||
/// <value>
|
/// <summary>
|
||||||
/// The funcs.
|
/// The functions
|
||||||
/// </value>
|
/// </summary>
|
||||||
public Func<IDictionary<string, string>, bool>[] Funcs { get; }
|
public Func<IDictionary<string, string>, bool>[] Funcs { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -32,11 +33,11 @@ namespace WireMock.Matchers.Request
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="RequestMessageCookieMatcher"/> class.
|
/// Initializes a new instance of the <see cref="RequestMessageCookieMatcher"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="matchBehaviour">The match behaviour.</param>
|
|
||||||
/// <param name="name">The name.</param>
|
/// <param name="name">The name.</param>
|
||||||
/// <param name="pattern">The pattern.</param>
|
/// <param name="pattern">The pattern.</param>
|
||||||
/// <param name="ignoreCase">The ignoreCase.</param>
|
/// <param name="ignoreCase">Ignore the case from the pattern.</param>
|
||||||
public RequestMessageCookieMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, [NotNull] string pattern, bool ignoreCase = true)
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
|
public RequestMessageCookieMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, [NotNull] string pattern, bool ignoreCase)
|
||||||
{
|
{
|
||||||
Check.NotNull(name, nameof(name));
|
Check.NotNull(name, nameof(name));
|
||||||
Check.NotNull(pattern, nameof(pattern));
|
Check.NotNull(pattern, nameof(pattern));
|
||||||
@@ -50,15 +51,32 @@ namespace WireMock.Matchers.Request
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="RequestMessageCookieMatcher"/> class.
|
/// Initializes a new instance of the <see cref="RequestMessageCookieMatcher"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
|
/// <param name="name">The name.</param>
|
||||||
|
/// <param name="patterns">The patterns.</param>
|
||||||
|
/// <param name="ignoreCase">Ignore the case from the pattern.</param>
|
||||||
|
public RequestMessageCookieMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, bool ignoreCase, [NotNull] params string[] patterns) :
|
||||||
|
this(matchBehaviour, name, ignoreCase, patterns.Select(pattern => new WildcardMatcher(matchBehaviour, pattern, ignoreCase)).Cast<IStringMatcher>().ToArray())
|
||||||
|
{
|
||||||
|
Check.NotNull(patterns, nameof(patterns));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="RequestMessageCookieMatcher"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
/// <param name="name">The name.</param>
|
/// <param name="name">The name.</param>
|
||||||
/// <param name="matchers">The matchers.</param>
|
/// <param name="matchers">The matchers.</param>
|
||||||
public RequestMessageCookieMatcher([NotNull] string name, [NotNull] params IStringMatcher[] matchers)
|
/// <param name="ignoreCase">Ignore the case from the pattern.</param>
|
||||||
|
public RequestMessageCookieMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, bool ignoreCase, [NotNull] params IStringMatcher[] matchers)
|
||||||
{
|
{
|
||||||
Check.NotNull(name, nameof(name));
|
Check.NotNull(name, nameof(name));
|
||||||
Check.NotNull(matchers, nameof(matchers));
|
Check.NotNull(matchers, nameof(matchers));
|
||||||
|
|
||||||
|
_matchBehaviour = matchBehaviour;
|
||||||
Name = name;
|
Name = name;
|
||||||
Matchers = matchers;
|
Matchers = matchers;
|
||||||
|
_ignoreCase = ignoreCase;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using JetBrains.Annotations;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using WireMock.Types;
|
||||||
using WireMock.Util;
|
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Matchers.Request
|
namespace WireMock.Matchers.Request
|
||||||
@@ -52,33 +52,32 @@ namespace WireMock.Matchers.Request
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="RequestMessageHeaderMatcher"/> class.
|
/// Initializes a new instance of the <see cref="RequestMessageHeaderMatcher"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
/// <param name="name">The name.</param>
|
/// <param name="name">The name.</param>
|
||||||
/// <param name="patterns">The patterns.</param>
|
/// <param name="patterns">The patterns.</param>
|
||||||
/// <param name="ignoreCase">Ignore the case from the pattern.</param>
|
/// <param name="ignoreCase">Ignore the case from the pattern.</param>
|
||||||
/// <param name="matchBehaviour">The match behaviour.</param>
|
public RequestMessageHeaderMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, bool ignoreCase, [NotNull] params string[] patterns) :
|
||||||
public RequestMessageHeaderMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, [NotNull] string[] patterns, bool ignoreCase)
|
this(matchBehaviour, name, ignoreCase, patterns.Select(pattern => new WildcardMatcher(matchBehaviour, pattern, ignoreCase)).Cast<IStringMatcher>().ToArray())
|
||||||
{
|
{
|
||||||
Check.NotNull(name, nameof(name));
|
|
||||||
Check.NotNull(patterns, nameof(patterns));
|
Check.NotNull(patterns, nameof(patterns));
|
||||||
|
|
||||||
_matchBehaviour = matchBehaviour;
|
|
||||||
_ignoreCase = ignoreCase;
|
|
||||||
Name = name;
|
|
||||||
Matchers = patterns.Select(pattern => new WildcardMatcher(matchBehaviour, pattern, ignoreCase)).Cast<IStringMatcher>().ToArray();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="RequestMessageHeaderMatcher"/> class.
|
/// Initializes a new instance of the <see cref="RequestMessageHeaderMatcher"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="matchBehaviour">The match behaviour.</param>
|
||||||
/// <param name="name">The name.</param>
|
/// <param name="name">The name.</param>
|
||||||
/// <param name="matchers">The matchers.</param>
|
/// <param name="matchers">The matchers.</param>
|
||||||
public RequestMessageHeaderMatcher([NotNull] string name, [NotNull] params IStringMatcher[] matchers)
|
/// <param name="ignoreCase">Ignore the case from the pattern.</param>
|
||||||
|
public RequestMessageHeaderMatcher(MatchBehaviour matchBehaviour, [NotNull] string name, bool ignoreCase, [NotNull] params IStringMatcher[] matchers)
|
||||||
{
|
{
|
||||||
Check.NotNull(name, nameof(name));
|
Check.NotNull(name, nameof(name));
|
||||||
Check.NotNull(matchers, nameof(matchers));
|
Check.NotNull(matchers, nameof(matchers));
|
||||||
|
|
||||||
|
_matchBehaviour = matchBehaviour;
|
||||||
Name = name;
|
Name = name;
|
||||||
Matchers = matchers;
|
Matchers = matchers;
|
||||||
|
_ignoreCase = ignoreCase;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -125,7 +124,7 @@ namespace WireMock.Matchers.Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
WireMockList<string> list = headers[Name];
|
WireMockList<string> list = headers[Name];
|
||||||
return Matchers.Max(m => list.Max(value => m.IsMatch(value))); // TODO : is this correct ?
|
return Matchers.Max(m => list.Max(m.IsMatch)); // TODO : is this correct ?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using WireMock.Util;
|
using WireMock.Types;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
|
|
||||||
namespace WireMock.Matchers.Request
|
namespace WireMock.Matchers.Request
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ using JetBrains.Annotations;
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using WireMock.Handlers;
|
|
||||||
using WireMock.HttpsCertificate;
|
using WireMock.HttpsCertificate;
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
using WireMock.Owin.Mappers;
|
using WireMock.Owin.Mappers;
|
||||||
@@ -70,7 +69,6 @@ namespace WireMock.Owin
|
|||||||
_host = builder
|
_host = builder
|
||||||
.ConfigureServices(services =>
|
.ConfigureServices(services =>
|
||||||
{
|
{
|
||||||
services.AddSingleton(_options.FileSystemHandler);
|
|
||||||
services.AddSingleton(_options);
|
services.AddSingleton(_options);
|
||||||
services.AddSingleton<IMappingMatcher, MappingMatcher>();
|
services.AddSingleton<IMappingMatcher, MappingMatcher>();
|
||||||
services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>();
|
services.AddSingleton<IOwinRequestMapper, OwinRequestMapper>();
|
||||||
@@ -106,7 +104,7 @@ namespace WireMock.Owin
|
|||||||
PortUtils.TryExtract(url, out string protocol, out string host, out int port);
|
PortUtils.TryExtract(url, out string protocol, out string host, out int port);
|
||||||
options.Listen(System.Net.IPAddress.Any, port, listenOptions =>
|
options.Listen(System.Net.IPAddress.Any, port, listenOptions =>
|
||||||
{
|
{
|
||||||
listenOptions.UseHttps(PublicCertificateHelper.GetX509Certificate2());
|
listenOptions.UseHttps(); // PublicCertificateHelper.GetX509Certificate2()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace WireMock.Owin
|
|||||||
|
|
||||||
IStringMatcher AuthorizationMatcher { get; set; }
|
IStringMatcher AuthorizationMatcher { get; set; }
|
||||||
|
|
||||||
bool AllowPartialMapping { get; set; }
|
bool? AllowPartialMapping { get; set; }
|
||||||
|
|
||||||
ConcurrentDictionary<Guid, IMapping> Mappings { get; }
|
ConcurrentDictionary<Guid, IMapping> Mappings { get; }
|
||||||
|
|
||||||
@@ -37,5 +37,9 @@ namespace WireMock.Owin
|
|||||||
Action<IAppBuilder> PostWireMockMiddlewareInit { get; set; }
|
Action<IAppBuilder> PostWireMockMiddlewareInit { get; set; }
|
||||||
|
|
||||||
IFileSystemHandler FileSystemHandler { get; set; }
|
IFileSystemHandler FileSystemHandler { get; set; }
|
||||||
|
|
||||||
|
bool? AllowBodyForAllHttpMethods { get; set; }
|
||||||
|
|
||||||
|
bool? AllowAnyHttpStatusCodeInResponse { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,8 @@ namespace WireMock.Owin.Mappers
|
|||||||
/// MapAsync IRequest to RequestMessage
|
/// MapAsync IRequest to RequestMessage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The OwinRequest/HttpRequest</param>
|
/// <param name="request">The OwinRequest/HttpRequest</param>
|
||||||
|
/// <param name="options">The WireMockMiddlewareOptions</param>
|
||||||
/// <returns>RequestMessage</returns>
|
/// <returns>RequestMessage</returns>
|
||||||
Task<RequestMessage> MapAsync(IRequest request);
|
Task<RequestMessage> MapAsync(IRequest request, IWireMockMiddlewareOptions options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ namespace WireMock.Owin.Mappers
|
|||||||
internal class OwinRequestMapper : IOwinRequestMapper
|
internal class OwinRequestMapper : IOwinRequestMapper
|
||||||
{
|
{
|
||||||
/// <inheritdoc cref="IOwinRequestMapper.MapAsync"/>
|
/// <inheritdoc cref="IOwinRequestMapper.MapAsync"/>
|
||||||
public async Task<RequestMessage> MapAsync(IRequest request)
|
public async Task<RequestMessage> MapAsync(IRequest request, IWireMockMiddlewareOptions options)
|
||||||
{
|
{
|
||||||
(UrlDetails urldetails, string clientIP) = ParseRequest(request);
|
(UrlDetails urldetails, string clientIP) = ParseRequest(request);
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ namespace WireMock.Owin.Mappers
|
|||||||
}
|
}
|
||||||
|
|
||||||
BodyData body = null;
|
BodyData body = null;
|
||||||
if (request.Body != null && BodyParser.ShouldParseBody(method))
|
if (request.Body != null && BodyParser.ShouldParseBody(method, options.AllowBodyForAllHttpMethods == true))
|
||||||
{
|
{
|
||||||
body = await BodyParser.Parse(request.Body, request.ContentType);
|
body = await BodyParser.Parse(request.Body, request.ContentType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using RandomDataGenerator.FieldOptions;
|
||||||
|
using RandomDataGenerator.Randomizers;
|
||||||
|
using WireMock.Exceptions;
|
||||||
using WireMock.Handlers;
|
using WireMock.Handlers;
|
||||||
using WireMock.Http;
|
using WireMock.Http;
|
||||||
using WireMock.Util;
|
using WireMock.ResponseBuilders;
|
||||||
|
using WireMock.Types;
|
||||||
using WireMock.Validation;
|
using WireMock.Validation;
|
||||||
#if !USE_ASPNETCORE
|
#if !USE_ASPNETCORE
|
||||||
using IResponse = Microsoft.Owin.IOwinResponse;
|
using IResponse = Microsoft.Owin.IOwinResponse;
|
||||||
@@ -20,9 +25,11 @@ namespace WireMock.Owin.Mappers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// OwinResponseMapper
|
/// OwinResponseMapper
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OwinResponseMapper : IOwinResponseMapper
|
internal class OwinResponseMapper : IOwinResponseMapper
|
||||||
{
|
{
|
||||||
private readonly IFileSystemHandler _fileSystemHandler;
|
private readonly IRandomizerNumber<double> _randomizerDouble = RandomizerFactory.GetRandomizer(new FieldOptionsDouble { Min = 0, Max = 1 });
|
||||||
|
private readonly IRandomizerBytes _randomizerBytes = RandomizerFactory.GetRandomizer(new FieldOptionsBytes { Min = 100, Max = 200 });
|
||||||
|
private readonly IWireMockMiddlewareOptions _options;
|
||||||
private readonly Encoding _utf8NoBom = new UTF8Encoding(false);
|
private readonly Encoding _utf8NoBom = new UTF8Encoding(false);
|
||||||
|
|
||||||
// https://msdn.microsoft.com/en-us/library/78h415ay(v=vs.110).aspx
|
// https://msdn.microsoft.com/en-us/library/78h415ay(v=vs.110).aspx
|
||||||
@@ -37,12 +44,12 @@ namespace WireMock.Owin.Mappers
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="fileSystemHandler">The IFileSystemHandler.</param>
|
/// <param name="options">The IWireMockMiddlewareOptions.</param>
|
||||||
public OwinResponseMapper(IFileSystemHandler fileSystemHandler)
|
public OwinResponseMapper(IWireMockMiddlewareOptions options)
|
||||||
{
|
{
|
||||||
Check.NotNull(fileSystemHandler, nameof(fileSystemHandler));
|
Check.NotNull(options, nameof(options));
|
||||||
|
|
||||||
_fileSystemHandler = fileSystemHandler;
|
_options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="IOwinResponseMapper.MapAsync"/>
|
/// <inheritdoc cref="IOwinResponseMapper.MapAsync"/>
|
||||||
@@ -53,27 +60,37 @@ namespace WireMock.Owin.Mappers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
response.StatusCode = responseMessage.StatusCode;
|
byte[] bytes;
|
||||||
|
switch (responseMessage.FaultType)
|
||||||
byte[] bytes = null;
|
|
||||||
switch (responseMessage.BodyData?.DetectedBodyType)
|
|
||||||
{
|
{
|
||||||
case BodyType.String:
|
case FaultType.EMPTY_RESPONSE:
|
||||||
bytes = (responseMessage.BodyData.Encoding ?? _utf8NoBom).GetBytes(responseMessage.BodyData.BodyAsString);
|
bytes = IsFault(responseMessage) ? new byte[0] : GetNormalBody(responseMessage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BodyType.Json:
|
case FaultType.MALFORMED_RESPONSE_CHUNK:
|
||||||
Formatting formatting = responseMessage.BodyData.BodyAsJsonIndented == true ? Formatting.Indented : Formatting.None;
|
bytes = GetNormalBody(responseMessage) ?? new byte[0];
|
||||||
string jsonBody = JsonConvert.SerializeObject(responseMessage.BodyData.BodyAsJson, new JsonSerializerSettings { Formatting = formatting, NullValueHandling = NullValueHandling.Ignore });
|
if (IsFault(responseMessage))
|
||||||
bytes = (responseMessage.BodyData.Encoding ?? _utf8NoBom).GetBytes(jsonBody);
|
{
|
||||||
|
bytes = bytes.Take(bytes.Length / 2).Union(_randomizerBytes.Generate()).ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BodyType.Bytes:
|
default:
|
||||||
bytes = responseMessage.BodyData.BodyAsBytes;
|
bytes = GetNormalBody(responseMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (responseMessage.StatusCode)
|
||||||
|
{
|
||||||
|
case int statusCodeAsInteger:
|
||||||
|
response.StatusCode = MapStatusCode(statusCodeAsInteger);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BodyType.File:
|
case string statusCodeAsString:
|
||||||
bytes = _fileSystemHandler.ReadResponseBodyAsFile(responseMessage.BodyData.BodyAsFile);
|
// Note: this case will also match on null
|
||||||
|
int.TryParse(statusCodeAsString, out int result);
|
||||||
|
response.StatusCode = MapStatusCode(result);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,6 +102,50 @@ namespace WireMock.Owin.Mappers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int MapStatusCode(int code)
|
||||||
|
{
|
||||||
|
if (_options.AllowAnyHttpStatusCodeInResponse == true || Enum.IsDefined(typeof(HttpStatusCode), code))
|
||||||
|
{
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int)HttpStatusCode.OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsFault(ResponseMessage responseMessage)
|
||||||
|
{
|
||||||
|
return responseMessage.FaultPercentage == null || _randomizerDouble.Generate() <= responseMessage.FaultPercentage;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] GetNormalBody(ResponseMessage responseMessage)
|
||||||
|
{
|
||||||
|
byte[] bytes = null;
|
||||||
|
switch (responseMessage.BodyData?.DetectedBodyType)
|
||||||
|
{
|
||||||
|
case BodyType.String:
|
||||||
|
bytes = (responseMessage.BodyData.Encoding ?? _utf8NoBom).GetBytes(responseMessage.BodyData.BodyAsString);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BodyType.Json:
|
||||||
|
Formatting formatting = responseMessage.BodyData.BodyAsJsonIndented == true
|
||||||
|
? Formatting.Indented
|
||||||
|
: Formatting.None;
|
||||||
|
string jsonBody = JsonConvert.SerializeObject(responseMessage.BodyData.BodyAsJson, new JsonSerializerSettings { Formatting = formatting, NullValueHandling = NullValueHandling.Ignore });
|
||||||
|
bytes = (responseMessage.BodyData.Encoding ?? _utf8NoBom).GetBytes(jsonBody);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BodyType.Bytes:
|
||||||
|
bytes = responseMessage.BodyData.BodyAsBytes;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BodyType.File:
|
||||||
|
bytes = _options.FileSystemHandler.ReadResponseBodyAsFile(responseMessage.BodyData.BodyAsFile);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
private void SetResponseHeaders(ResponseMessage responseMessage, IResponse response)
|
private void SetResponseHeaders(ResponseMessage responseMessage, IResponse response)
|
||||||
{
|
{
|
||||||
// Set headers
|
// Set headers
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace WireMock.Owin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_options.AllowPartialMapping)
|
if (_options.AllowPartialMapping == true)
|
||||||
{
|
{
|
||||||
var partialMappings = mappings
|
var partialMappings = mappings
|
||||||
.Where(pm => (pm.Mapping.IsAdminInterface && pm.RequestMatchResult.IsPerfectMatch) || !pm.Mapping.IsAdminInterface)
|
.Where(pm => (pm.Mapping.IsAdminInterface && pm.RequestMatchResult.IsPerfectMatch) || !pm.Mapping.IsAdminInterface)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WireMock.Handlers;
|
|
||||||
using WireMock.Logging;
|
using WireMock.Logging;
|
||||||
using WireMock.Owin.Mappers;
|
using WireMock.Owin.Mappers;
|
||||||
using WireMock.Util;
|
using WireMock.Util;
|
||||||
@@ -76,7 +75,7 @@ namespace WireMock.Owin
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var requestMapper = new OwinRequestMapper();
|
var requestMapper = new OwinRequestMapper();
|
||||||
var responseMapper = new OwinResponseMapper(_options.FileSystemHandler);
|
var responseMapper = new OwinResponseMapper(_options);
|
||||||
var matcher = new MappingMatcher(_options);
|
var matcher = new MappingMatcher(_options);
|
||||||
|
|
||||||
Action<IAppBuilder> startup = app =>
|
Action<IAppBuilder> startup = app =>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user