mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-24 09:48:51 +02:00
Rewrite some unit-integration-tests to unit-tests (#206)
This commit is contained in:
@@ -22,14 +22,14 @@
|
||||
<tr><th>Coverable lines:</th><td>46</td></tr>
|
||||
<tr><th>Total lines:</th><td>96</td></tr>
|
||||
<tr><th>Line coverage:</th><td>93.4%</td></tr>
|
||||
<tr><th>Branch coverage:</th><td>85.1%</td></tr>
|
||||
<tr><th>Branch coverage:</th><td>86.7%</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h1>Metrics</h1>
|
||||
<table class="overview table-fixed">
|
||||
<thead><tr><th>Method</th><th>Cyclomatic complexity <a href="https://en.wikipedia.org/wiki/Cyclomatic_complexity"><i class="icon-info-circled"></i></a></th><th>NPath complexity <a href="https://modess.io/npath-complexity-cyclomatic-complexity-explained"><i class="icon-info-circled"></i></a></th><th>Sequence coverage <a href="https://en.wikipedia.org/wiki/Code_coverage"><i class="icon-info-circled"></i></a></th><th>Branch coverage <a href="https://en.wikipedia.org/wiki/Code_coverage"><i class="icon-info-circled"></i></a></th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td title="WireMock.Matchers.IMatcher WireMock.Serialization.MatcherMapper::Map(WireMock.Admin.Mappings.MatcherModel)">Map(...)</td><td>0</td><td>0</td><td>0.875</td><td>0.839</td></tr>
|
||||
<tr><td title="WireMock.Matchers.IMatcher WireMock.Serialization.MatcherMapper::Map(WireMock.Admin.Mappings.MatcherModel)">Map(...)</td><td>0</td><td>0</td><td>0.875</td><td>0.86</td></tr>
|
||||
<tr><td title="WireMock.Admin.Mappings.MatcherModel[] WireMock.Serialization.MatcherMapper::Map(System.Collections.Generic.IEnumerable`1<WireMock.Matchers.IMatcher>)">Map(...)</td><td>0</td><td>0</td><td>1</td><td>1</td></tr>
|
||||
<tr><td title="WireMock.Admin.Mappings.MatcherModel WireMock.Serialization.MatcherMapper::Map(WireMock.Matchers.IMatcher)">Map(...)</td><td>0</td><td>0</td><td>1</td><td>0.857</td></tr>
|
||||
</tbody>
|
||||
@@ -63,7 +63,7 @@
|
||||
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '24', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">24</td><td class="rightmargin right"><a id="file0_line22"></a><code>22</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code> string matcherType = parts.Length > 1 ? parts[1] : null;</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line23"></a><code>23</code></td><td></td><td class="lightgray"><code></code></td></tr>
|
||||
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '24', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">24</td><td class="rightmargin right"><a id="file0_line24"></a><code>24</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code> string[] stringPatterns = matcher.Patterns != null ? matcher.Patterns.Cast<string>().ToArray() : new[] { mat</code></td></tr>
|
||||
<tr title="2 of 4 branches are covered" data-coverage="{'AllTestMethods': {'VC': '24', 'LVS': 'orange'}}"><td class="orange"> </td><td class="leftmargin rightmargin right">24</td><td class="rightmargin right"><a id="file0_line25"></a><code>25</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code> MatchBehaviour matchBehaviour = matcher.RejectOnMatch == true ? MatchBehaviour.RejectOnMatch : MatchBehaviou</code></td></tr>
|
||||
<tr title="1 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '24', 'LVS': 'orange'}}"><td class="orange"> </td><td class="leftmargin rightmargin right">24</td><td class="rightmargin right"><a id="file0_line25"></a><code>25</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code> MatchBehaviour matchBehaviour = matcher.RejectOnMatch == true ? MatchBehaviour.RejectOnMatch : MatchBehaviou</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line26"></a><code>26</code></td><td></td><td class="lightgray"><code></code></td></tr>
|
||||
<tr title="32 of 38 branches are covered" data-coverage="{'AllTestMethods': {'VC': '24', 'LVS': 'orange'}}"><td class="orange"> </td><td class="leftmargin rightmargin right">24</td><td class="rightmargin right"><a id="file0_line27"></a><code>27</code></td><td class="percentagebar80"><i class="icon-fork"></i></td><td class="lightorange"><code> switch (matcherName)</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line28"></a><code>28</code></td><td></td><td class="lightgray"><code> {</code></td></tr>
|
||||
@@ -74,7 +74,7 @@
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '11', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">11</td><td class="rightmargin right"><a id="file0_line33"></a><code>33</code></td><td></td><td class="lightgreen"><code> return new ExactMatcher(matchBehaviour, stringPatterns);</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line34"></a><code>34</code></td><td></td><td class="lightgray"><code></code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line35"></a><code>35</code></td><td></td><td class="lightgray"><code> case "RegexMatcher":</code></td></tr>
|
||||
<tr title="1 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '1', 'LVS': 'orange'}}"><td class="orange"> </td><td class="leftmargin rightmargin right">1</td><td class="rightmargin right"><a id="file0_line36"></a><code>36</code></td><td class="percentagebar50"><i class="icon-fork"></i></td><td class="lightorange"><code> return new RegexMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '1', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">1</td><td class="rightmargin right"><a id="file0_line36"></a><code>36</code></td><td></td><td class="lightgreen"><code> return new RegexMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line37"></a><code>37</code></td><td></td><td class="lightgray"><code></code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line38"></a><code>38</code></td><td></td><td class="lightgray"><code> case "JsonMatcher":</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '0', 'LVS': 'red'}}"><td class="red"> </td><td class="leftmargin rightmargin right">0</td><td class="rightmargin right"><a id="file0_line39"></a><code>39</code></td><td></td><td class="lightred"><code> return new JsonMatcher(matchBehaviour, matcher.Pattern);</code></td></tr>
|
||||
@@ -86,7 +86,7 @@
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '0', 'LVS': 'red'}}"><td class="red"> </td><td class="leftmargin rightmargin right">0</td><td class="rightmargin right"><a id="file0_line45"></a><code>45</code></td><td></td><td class="lightred"><code> return new XPathMatcher(matchBehaviour, (string)matcher.Pattern);</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line46"></a><code>46</code></td><td></td><td class="lightgray"><code></code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line47"></a><code>47</code></td><td></td><td class="lightgray"><code> case "WildcardMatcher":</code></td></tr>
|
||||
<tr title="2 of 2 branches are covered" data-coverage="{'AllTestMethods': {'VC': '5', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">5</td><td class="rightmargin right"><a id="file0_line48"></a><code>48</code></td><td class="percentagebar100"><i class="icon-fork"></i></td><td class="lightgreen"><code> return new WildcardMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '5', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">5</td><td class="rightmargin right"><a id="file0_line48"></a><code>48</code></td><td></td><td class="lightgreen"><code> return new WildcardMatcher(matchBehaviour, stringPatterns, matcher.IgnoreCase == true);</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line49"></a><code>49</code></td><td></td><td class="lightgray"><code></code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line50"></a><code>50</code></td><td></td><td class="lightgray"><code> case "SimMetricsMatcher":</code></td></tr>
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '3', 'LVS': 'green'}}"><td class="green"> </td><td class="leftmargin rightmargin right">3</td><td class="rightmargin right"><a id="file0_line51"></a><code>51</code></td><td></td><td class="lightgreen"><code> SimMetricType type = SimMetricType.Levenstein;</code></td></tr>
|
||||
@@ -137,7 +137,7 @@
|
||||
<tr data-coverage="{'AllTestMethods': {'VC': '', 'LVS': 'gray'}}"><td class="gray"> </td><td class="leftmargin rightmargin right"></td><td class="rightmargin right"><a id="file0_line96"></a><code>96</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-21 - 14:00:17<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-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="containerright">
|
||||
<div class="containerrightfixed">
|
||||
<h1>Methods/Properties</h1>
|
||||
|
||||
Reference in New Issue
Block a user