NET Core 2.1 + support for Service Fabric commandline parameters (#209)

* netcore 2.1

* SimpleCommandLineParserTests

* tests

* SimpleCommandLineParserTests

* test report

* AspNetCoreSelfHost

* Fixed Resharper warnings

* tests

* .

* ResponseWithProxyTests

ResponseWithProxyTests

* postmanecho
This commit is contained in:
Stef Heyenrath
2018-10-10 09:49:32 +02:00
committed by GitHub
parent 04bcca6e14
commit 83457c1601
147 changed files with 3676 additions and 3330 deletions

View File

@@ -16,7 +16,7 @@
<tbody>
<tr><th>Class:</th><td>WireMock.Owin.Mappers.OwinResponseMapper</td></tr>
<tr><th>Assembly:</th><td>WireMock.Net</td></tr>
<tr><th>File(s):</th><td><a href="#CUsersazureuserDocumentsGithubWireMockNetsrcWireMockNetOwinMappersOwinResponseMappercs" data-ng-click="navigateToHash('#CUsersazureuserDocumentsGithubWireMockNetsrcWireMockNetOwinMappersOwinResponseMappercs')">C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs</a></td></tr>
<tr><th>File(s):</th><td><a href="#CUsersStefHeyenrathDocumentsGitHubWireMockNetsrcWireMockNetOwinMappersOwinResponseMappercs" data-ng-click="navigateToHash('#CUsersStefHeyenrathDocumentsGitHubWireMockNetsrcWireMockNetOwinMappersOwinResponseMappercs')">C:\Users\StefHeyenrath\Documents\GitHub\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs</a></td></tr>
<tr><th>Covered lines:</th><td>44</td></tr>
<tr><th>Uncovered lines:</th><td>3</td></tr>
<tr><th>Coverable lines:</th><td>47</td></tr>
@@ -36,7 +36,7 @@
</tbody>
</table>
<h1>File(s)</h1>
<h2 id="CUsersazureuserDocumentsGithubWireMockNetsrcWireMockNetOwinMappersOwinResponseMappercs">C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs</h2>
<h2 id="CUsersStefHeyenrathDocumentsGitHubWireMockNetsrcWireMockNetOwinMappersOwinResponseMappercs">C:\Users\StefHeyenrath\Documents\GitHub\WireMock.Net\src\WireMock.Net\Owin\Mappers\OwinResponseMapper.cs</h2>
<table class="lineAnalysis">
<thead><tr><th></th><th>#</th><th>Line</th><th></th><th>Line coverage</th></tr></thead>
<tbody>
@@ -95,15 +95,15 @@
<tr data-coverage="{'AllTestMethods': {'VC': '0', 'LVS': 'red'}}"><td class="red">&nbsp;</td><td class="leftmargin rightmargin right">0</td><td class="rightmargin right"><a id="file0_line53"></a><code>53</code></td><td></td><td class="lightred"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '0', 'LVS': 'red'}}"><td class="red">&nbsp;</td><td class="leftmargin rightmargin right">0</td><td class="rightmargin right"><a id="file0_line54"></a><code>54</code></td><td></td><td class="lightred"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bytes&nbsp;=&nbsp;File.ReadAllBytes(responseMessage.BodyAsFile);</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '0', 'LVS': 'red'}}"><td class="red">&nbsp;</td><td class="leftmargin rightmargin right">0</td><td class="rightmargin right"><a id="file0_line55"></a><code>55</code></td><td></td><td class="lightred"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '51', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">51</td><td class="rightmargin right"><a id="file0_line56"></a><code>56</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;if&nbsp;(responseMessage.BodyAsJson&nbsp;!=&nbsp;null)</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '50', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">50</td><td class="rightmargin right"><a id="file0_line56"></a><code>56</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;if&nbsp;(responseMessage.BodyAsJson&nbsp;!=&nbsp;null)</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '15', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">15</td><td class="rightmargin right"><a id="file0_line57"></a><code>57</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
<tr title="1 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '15', 'LVS': 'orange'}}"><td class="orange">&nbsp;</td><td class="leftmargin rightmargin right">15</td><td class="rightmargin right"><a id="file0_line58"></a><code>58</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Formatting&nbsp;formatting&nbsp;=&nbsp;responseMessage.BodyAsJsonIndented&nbsp;==&nbsp;true&nbsp;?&nbsp;Formatting.Indented&nbsp;:&nbsp;Formatting.No</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '15', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">15</td><td class="rightmargin right"><a id="file0_line59"></a><code>59</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;string&nbsp;jsonBody&nbsp;=&nbsp;JsonConvert.SerializeObject(responseMessage.BodyAsJson,&nbsp;new&nbsp;JsonSerializerSettings&nbsp;{&nbsp;F</code></td></tr>
<tr title="1 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '15', 'LVS': 'orange'}}"><td class="orange">&nbsp;</td><td class="leftmargin rightmargin right">15</td><td class="rightmargin right"><a id="file0_line60"></a><code>60</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bytes&nbsp;=&nbsp;(responseMessage.BodyEncoding&nbsp;??&nbsp;_utf8NoBom).GetBytes(jsonBody);</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '15', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">15</td><td class="rightmargin right"><a id="file0_line61"></a><code>61</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '36', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">36</td><td class="rightmargin right"><a id="file0_line62"></a><code>62</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;if&nbsp;(responseMessage.Body&nbsp;!=&nbsp;null)</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '35', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">35</td><td class="rightmargin right"><a id="file0_line62"></a><code>62</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;if&nbsp;(responseMessage.Body&nbsp;!=&nbsp;null)</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '19', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">19</td><td class="rightmargin right"><a id="file0_line63"></a><code>63</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
<tr title="1 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '19', 'LVS': 'orange'}}"><td class="orange">&nbsp;</td><td class="leftmargin rightmargin right">19</td><td class="rightmargin right"><a id="file0_line64"></a><code>64</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bytes&nbsp;=&nbsp;(responseMessage.BodyEncoding&nbsp;??&nbsp;_utf8NoBom).GetBytes(responseMessage.Body);</code></td></tr>
<tr title="1 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '18', 'LVS': 'orange'}}"><td class="orange">&nbsp;</td><td class="leftmargin rightmargin right">18</td><td class="rightmargin right"><a id="file0_line64"></a><code>64</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bytes&nbsp;=&nbsp;(responseMessage.BodyEncoding&nbsp;??&nbsp;_utf8NoBom).GetBytes(responseMessage.Body);</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '19', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">19</td><td class="rightmargin right"><a id="file0_line65"></a><code>65</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray">&nbsp;</td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line66"></a><code>66</code></td><td></td><td class="lightgray"><code></code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '52', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">52</td><td class="rightmargin right"><a id="file0_line67"></a><code>67</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SetResponseHeaders(responseMessage,&nbsp;response);</code></td></tr>
@@ -115,9 +115,9 @@
<tr data-coverage="{'AllTestMethods': {'VC': '53', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">53</td><td class="rightmargin right"><a id="file0_line73"></a><code>73</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray">&nbsp;</td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line74"></a><code>74</code></td><td></td><td class="lightgray"><code></code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray">&nbsp;</td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line75"></a><code>75</code></td><td></td><td class="lightgray"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;SetResponseHeaders(ResponseMessage&nbsp;responseMessage,&nbsp;IResponse&nbsp;response)</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '52', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">52</td><td class="rightmargin right"><a id="file0_line76"></a><code>76</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '51', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">51</td><td class="rightmargin right"><a id="file0_line76"></a><code>76</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray">&nbsp;</td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line77"></a><code>77</code></td><td></td><td class="lightgray"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Set&nbsp;headers</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '202', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">202</td><td class="rightmargin right"><a id="file0_line78"></a><code>78</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(var&nbsp;pair&nbsp;in&nbsp;responseMessage.Headers)</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '201', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">201</td><td class="rightmargin right"><a id="file0_line78"></a><code>78</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach&nbsp;(var&nbsp;pair&nbsp;in&nbsp;responseMessage.Headers)</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '23', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">23</td><td class="rightmargin right"><a id="file0_line79"></a><code>79</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '23', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">23</td><td class="rightmargin right"><a id="file0_line80"></a><code>80</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(ResponseHeadersToFix.ContainsKey(pair.Key))</code></td></tr>
<tr data-coverage="{'AllTestMethods': {'VC': '19', 'LVS': 'green'}}"><td class="green">&nbsp;</td><td class="leftmargin rightmargin right">19</td><td class="rightmargin right"><a id="file0_line81"></a><code>81</code></td><td></td><td class="lightgreen"><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</code></td></tr>
@@ -142,7 +142,7 @@
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray">&nbsp;</td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line100"></a><code>100</code></td><td></td><td class="lightgray"><code>}</code></td></tr>
</tbody>
</table>
<div class="footer">Generated by: ReportGenerator 3.1.2.0<br />2018-09-26 - 11:51:45<br /><a href="https://github.com/danielpalme/ReportGenerator">GitHub</a> | <a href="http://www.palmmedia.de">www.palmmedia.de</a></div></div>
<div class="footer">Generated by: ReportGenerator 3.1.2.0<br />2018-10-09 - 12:23:36<br /><a href="https://github.com/danielpalme/ReportGenerator">GitHub</a> | <a href="http://www.palmmedia.de">www.palmmedia.de</a></div></div>
<div class="containerright">
<div class="containerrightfixed">
<h1>Methods/Properties</h1>