Permalink
Browse files

Build: improve coverage

  • Loading branch information...
dupdob committed Jun 13, 2017
1 parent aa2323a commit 9b03f6572ef6a0b63d1cacd113b1e3573482e3b6

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<test-run id="2" testcasecount="9" result="Passed" total="9" passed="9" failed="0" inconclusive="0" skipped="0" asserts="0" engine-version="3.6.1.0" clr-version="4.0.30319.42000" start-time="2017-06-12 20:44:11Z" end-time="2017-06-12 20:44:18Z" duration="6.710467">
<test-run id="2" testcasecount="9" result="Passed" total="9" passed="9" failed="0" inconclusive="0" skipped="0" asserts="0" engine-version="3.6.1.0" clr-version="4.0.30319.42000" start-time="2017-06-13 10:18:33Z" end-time="2017-06-13 10:18:44Z" duration="10.375893">
<command-line><![CDATA["C:\Users\dupdo\Documents\GitHub\NFluent\.build\..\packages\NUnit.ConsoleRunner.3.6.1\tools\nunit3-console.exe" C:\Users\dupdo\Documents\GitHub\NFluent\.build\..\tests\NFluent.45.Tests.Extensions\bin\Release\NFluent.Tests.Extensions.dll -result=C:\Users\dupdo\Documents\GitHub\NFluent\.build\..\results.xml -framework:net-4.5"]]></command-line>
<test-suite type="Assembly" id="0-1012" name="NFluent.Tests.Extensions.dll" fullname="C:\Users\dupdo\Documents\GitHub\NFluent\tests\NFluent.45.Tests.Extensions\bin\Release\NFluent.Tests.Extensions.dll" runstate="Runnable" testcasecount="9" result="Passed" start-time="2017-06-12 20:44:16Z" end-time="2017-06-12 20:44:17Z" duration="1.248733" total="9" passed="9" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="Assembly" id="0-1012" name="NFluent.Tests.Extensions.dll" fullname="C:\Users\dupdo\Documents\GitHub\NFluent\tests\NFluent.45.Tests.Extensions\bin\Release\NFluent.Tests.Extensions.dll" runstate="Runnable" testcasecount="9" result="Passed" start-time="2017-06-13 10:18:41Z" end-time="2017-06-13 10:18:43Z" duration="2.142819" total="9" passed="9" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<environment framework-version="3.7.1.0" clr-version="4.0.30319.42000" os-version="Microsoft Windows NT 10.0.15063.0" platform="Win32NT" cwd="C:\Users\dupdo\Documents\GitHub\NFluent\.build" machine-name="DESKTOP-0O6EJR5" user="dupdo" user-domain="DESKTOP-0O6EJR5" culture="fr-FR" uiculture="fr-FR" os-architecture="x64" />
<settings>
<setting name="RuntimeFramework" value="net-4.5" />
@@ -14,27 +14,27 @@
<setting name="NumberOfTestWorkers" value="4" />
</settings>
<properties>
<property name="_PID" value="25168" />
<property name="_PID" value="29608" />
<property name="_APPDOMAIN" value="domain-" />
</properties>
<test-suite type="TestSuite" id="0-1013" name="NFluent" fullname="NFluent" runstate="Runnable" testcasecount="9" result="Passed" start-time="2017-06-12 20:44:16Z" end-time="2017-06-12 20:44:17Z" duration="1.187336" total="9" passed="9" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestSuite" id="0-1014" name="Tests" fullname="NFluent.Tests" runstate="Runnable" testcasecount="9" result="Passed" start-time="2017-06-12 20:44:16Z" end-time="2017-06-12 20:44:17Z" duration="1.156074" total="9" passed="9" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestSuite" id="0-1015" name="Extensions" fullname="NFluent.Tests.Extensions" runstate="Runnable" testcasecount="6" result="Passed" start-time="2017-06-12 20:44:16Z" end-time="2017-06-12 20:44:17Z" duration="0.547923" total="6" passed="6" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestFixture" id="0-1004" name="ExtensionSpikeTests" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" testcasecount="4" result="Passed" start-time="2017-06-12 20:44:16Z" end-time="2017-06-12 20:44:17Z" duration="0.428974" total="4" passed="4" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="0-1008" name="CanLoadExtensionsFromAnotherAssembly" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.CanLoadExtensionsFromAnotherAssembly" methodname="CanLoadExtensionsFromAnotherAssembly" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="38302488" result="Passed" start-time="2017-06-12 20:44:16Z" end-time="2017-06-12 20:44:16Z" duration="0.215023" asserts="0" />
<test-case id="0-1005" name="CanUseVariousExtensions" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.CanUseVariousExtensions" methodname="CanUseVariousExtensions" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="1234971441" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.077091" asserts="0" />
<test-case id="0-1007" name="CheckWorksWithDecimal" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.CheckWorksWithDecimal" methodname="CheckWorksWithDecimal" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="1856445097" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.025116" asserts="0" />
<test-case id="0-1006" name="WorksWhenSutIsADerivedTypeOfTheInterfaceReferencedAsTheTypeParameterOfTheFluentAssertion" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.WorksWhenSutIsADerivedTypeOfTheInterfaceReferencedAsTheTypeParameterOfTheFluentAssertion" methodname="WorksWhenSutIsADerivedTypeOfTheInterfaceReferencedAsTheTypeParameterOfTheFluentAssertion" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="1980326902" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.003270" asserts="0" />
<test-suite type="TestSuite" id="0-1013" name="NFluent" fullname="NFluent" runstate="Runnable" testcasecount="9" result="Passed" start-time="2017-06-13 10:18:41Z" end-time="2017-06-13 10:18:43Z" duration="2.072334" total="9" passed="9" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestSuite" id="0-1014" name="Tests" fullname="NFluent.Tests" runstate="Runnable" testcasecount="9" result="Passed" start-time="2017-06-13 10:18:41Z" end-time="2017-06-13 10:18:43Z" duration="2.064456" total="9" passed="9" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestSuite" id="0-1015" name="Extensions" fullname="NFluent.Tests.Extensions" runstate="Runnable" testcasecount="6" result="Passed" start-time="2017-06-13 10:18:41Z" end-time="2017-06-13 10:18:42Z" duration="0.978244" total="6" passed="6" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-suite type="TestFixture" id="0-1004" name="ExtensionSpikeTests" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" testcasecount="4" result="Passed" start-time="2017-06-13 10:18:41Z" end-time="2017-06-13 10:18:42Z" duration="0.938150" total="4" passed="4" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="0-1008" name="CanLoadExtensionsFromAnotherAssembly" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.CanLoadExtensionsFromAnotherAssembly" methodname="CanLoadExtensionsFromAnotherAssembly" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="1382858091" result="Passed" start-time="2017-06-13 10:18:41Z" end-time="2017-06-13 10:18:42Z" duration="0.710197" asserts="0" />
<test-case id="0-1005" name="CanUseVariousExtensions" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.CanUseVariousExtensions" methodname="CanUseVariousExtensions" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="66070394" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:42Z" duration="0.114911" asserts="0" />
<test-case id="0-1007" name="CheckWorksWithDecimal" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.CheckWorksWithDecimal" methodname="CheckWorksWithDecimal" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="2117863934" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:42Z" duration="0.042492" asserts="0" />
<test-case id="0-1006" name="WorksWhenSutIsADerivedTypeOfTheInterfaceReferencedAsTheTypeParameterOfTheFluentAssertion" fullname="NFluent.Tests.Extensions.ExtensionSpikeTests.WorksWhenSutIsADerivedTypeOfTheInterfaceReferencedAsTheTypeParameterOfTheFluentAssertion" methodname="WorksWhenSutIsADerivedTypeOfTheInterfaceReferencedAsTheTypeParameterOfTheFluentAssertion" classname="NFluent.Tests.Extensions.ExtensionSpikeTests" runstate="Runnable" seed="357572883" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:42Z" duration="0.003102" asserts="0" />
</test-suite>
<test-suite type="TestFixture" id="0-1009" name="LinkableExtensionsTests" fullname="NFluent.Tests.Extensions.LinkableExtensionsTests" classname="NFluent.Tests.Extensions.LinkableExtensionsTests" runstate="Runnable" testcasecount="2" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.063028" total="2" passed="2" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="0-1010" name="CanChainMyChecks" fullname="NFluent.Tests.Extensions.LinkableExtensionsTests.CanChainMyChecks" methodname="CanChainMyChecks" classname="NFluent.Tests.Extensions.LinkableExtensionsTests" runstate="Runnable" seed="1791307440" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.002043" asserts="0" />
<test-case id="0-1011" name="CanChainMyStructChecks" fullname="NFluent.Tests.Extensions.LinkableExtensionsTests.CanChainMyStructChecks" methodname="CanChainMyStructChecks" classname="NFluent.Tests.Extensions.LinkableExtensionsTests" runstate="Runnable" seed="1708364582" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.014761" asserts="0" />
<test-suite type="TestFixture" id="0-1009" name="LinkableExtensionsTests" fullname="NFluent.Tests.Extensions.LinkableExtensionsTests" classname="NFluent.Tests.Extensions.LinkableExtensionsTests" runstate="Runnable" testcasecount="2" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:42Z" duration="0.030448" total="2" passed="2" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="0-1010" name="CanChainMyChecks" fullname="NFluent.Tests.Extensions.LinkableExtensionsTests.CanChainMyChecks" methodname="CanChainMyChecks" classname="NFluent.Tests.Extensions.LinkableExtensionsTests" runstate="Runnable" seed="1390181308" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:42Z" duration="0.001949" asserts="0" />
<test-case id="0-1011" name="CanChainMyStructChecks" fullname="NFluent.Tests.Extensions.LinkableExtensionsTests.CanChainMyStructChecks" methodname="CanChainMyStructChecks" classname="NFluent.Tests.Extensions.LinkableExtensionsTests" runstate="Runnable" seed="994438229" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:42Z" duration="0.021561" asserts="0" />
</test-suite>
</test-suite>
<test-suite type="TestFixture" id="0-1000" name="ReadmeRelatedTests" fullname="NFluent.Tests.ReadmeRelatedTests" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" testcasecount="3" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.516337" total="3" passed="3" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="0-1001" name="CodeSnippetForReadmeMarkdownFile" fullname="NFluent.Tests.ReadmeRelatedTests.CodeSnippetForReadmeMarkdownFile" methodname="CodeSnippetForReadmeMarkdownFile" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" seed="197411779" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.156616" asserts="0" />
<test-case id="0-1003" name="PlayingWithLambda" fullname="NFluent.Tests.ReadmeRelatedTests.PlayingWithLambda" methodname="PlayingWithLambda" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" seed="1784772834" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.262099" asserts="0" />
<test-case id="0-1002" name="PlayingWithProperties" fullname="NFluent.Tests.ReadmeRelatedTests.PlayingWithProperties" methodname="PlayingWithProperties" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" seed="586241068" result="Passed" start-time="2017-06-12 20:44:17Z" end-time="2017-06-12 20:44:17Z" duration="0.019533" asserts="0" />
<test-suite type="TestFixture" id="0-1000" name="ReadmeRelatedTests" fullname="NFluent.Tests.ReadmeRelatedTests" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" testcasecount="3" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:43Z" duration="0.976072" total="3" passed="3" failed="0" warnings="0" inconclusive="0" skipped="0" asserts="0">
<test-case id="0-1001" name="CodeSnippetForReadmeMarkdownFile" fullname="NFluent.Tests.ReadmeRelatedTests.CodeSnippetForReadmeMarkdownFile" methodname="CodeSnippetForReadmeMarkdownFile" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" seed="1725397744" result="Passed" start-time="2017-06-13 10:18:42Z" end-time="2017-06-13 10:18:43Z" duration="0.230373" asserts="0" />
<test-case id="0-1003" name="PlayingWithLambda" fullname="NFluent.Tests.ReadmeRelatedTests.PlayingWithLambda" methodname="PlayingWithLambda" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" seed="1100550697" result="Passed" start-time="2017-06-13 10:18:43Z" end-time="2017-06-13 10:18:43Z" duration="0.708047" asserts="0" />
<test-case id="0-1002" name="PlayingWithProperties" fullname="NFluent.Tests.ReadmeRelatedTests.PlayingWithProperties" methodname="PlayingWithProperties" classname="NFluent.Tests.ReadmeRelatedTests" runstate="Runnable" seed="1646896620" result="Passed" start-time="2017-06-13 10:18:43Z" end-time="2017-06-13 10:18:43Z" duration="0.020172" asserts="0" />
</test-suite>
</test-suite>
</test-suite>
@@ -668,7 +668,7 @@ private static bool IsAnEnumerableButNotAnEnumerableOfChars<T>(T element)
var sutCount = checkedValue.Count();
var expectedCount = enumerable.Count();
FluentMessage message;
if (checkedValue != null && enumerable != null)
if (enumerable != null)
{
if (sutCount < expectedCount && index == sutCount)
{
@@ -141,7 +141,7 @@ public static ICheckLink<ICheck<T>> IsNotEqualTo<T>(this ICheck<T> check, object
var checker = ExtensibilityHelper.ExtractChecker(check);
return checker.ExecuteCheck(
() => EqualityHelper.IsNotEqualTo(checker, expected, false),
() => EqualityHelper.IsNotEqualTo(checker, expected),
EqualityHelper.BuildErrorMessage(checker, expected, false, false));
}
@@ -248,8 +248,7 @@ private static string ContainsImpl(IChecker<string, ICheck<string>> checker, IEn
: checker.BuildShortMessage("The {0} is null.").For(typeof(string)).ReferenceValues(values).Label("The {0} substring(s):").ToString();
}
var enumerable = values as string[] ?? values.Cast<string>();
var items = enumerable.Where(item => checkedValue.Contains(item) == notContains).ToList();
var items = values.ToList().Where(item => checkedValue.Contains(item) == notContains).ToList();
if (negated == items.Count > 0)
{
@@ -258,7 +257,7 @@ private static string ContainsImpl(IChecker<string, ICheck<string>> checker, IEn
if (!notContains && negated)
{
items = enumerable.ToList();
items = values.ToList();
}
if (negated != notContains)
@@ -526,7 +525,7 @@ private static string IsEmptyImpl(IChecker<string, ICheck<string>> checker, bool
{
var checkedValue = checker.Value;
// special case if checkedvalue is null
// special case if checkedValue is null
if (checkedValue == null)
{
if (canBeNull != negated)
@@ -582,7 +581,7 @@ public static ICheckLink<ICheck<string>> IsEqualIgnoringCase(this ICheck<string>
/// <returns>A checker.</returns>
public static ICheck<IEnumerable<string>> AsLines(this ICheck<string> check)
{
IEnumerable<string> next = null;
IEnumerable<string> next;
var checker = ExtensibilityHelper.ExtractChecker(check);
if (checker.Value != null)
{
@@ -597,6 +596,10 @@ public static ICheck<IEnumerable<string>> AsLines(this ICheck<string> check)
next = lines;
}
else
{
next = new List<string>();
}
return new FluentCheck<IEnumerable<string>>(next);
}
Oops, something went wrong.

0 comments on commit 9b03f65

Please sign in to comment.