Skip to content

Commit

Permalink
Build: improve coverage for StringAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
dupdob committed Jun 13, 2017
1 parent bf83672 commit b726cb6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Expand Up @@ -139,6 +139,14 @@ public void ShouldReportDifferenceInSpaces()
Check.That(stringDifference[0].Kind).IsEqualTo(DifferenceMode.Spaces);
}

[Test]
public void ShouldReportDifferenceInSpacesAtEnd()
{
var stringDifference = StringDifference.Analyze("toto ", "toto\t ", false);
Check.That(stringDifference).HasSize(1);
Check.That(stringDifference[0].Kind).IsEqualTo(DifferenceMode.Spaces);
}

[Test]
public void ShouldReportDifferenceOfEoL()
{
Expand Down
7 changes: 4 additions & 3 deletions tests/NFluent.Tests/UserReportedIssuesTests.cs
Expand Up @@ -27,11 +27,12 @@ public class UserReportedIssuesTests
// issue 187
private class FakeClass
{
// ReSharper disable once UnusedAutoPropertyAccessor.Local
public List<string> Items { get; set; }
}

[Test]
public void hasfieldswithsamevalue_should_process_null_fields()
public void HasFieldsWithSameValueShouldProcessNullFields()
{
var instance1 = new FakeClass()
{
Expand Down Expand Up @@ -352,8 +353,8 @@ public void SpuriousExceptionOnError()
Check.ThatCode(() =>
{
var toTest = new List<string> { "MaChaine{94}" };
const string result = "MaChaine{964}";
Check.That(toTest).Contains(result);
const string Result = "MaChaine{964}";
Check.That(toTest).Contains(Result);
})
.Throws<FluentCheckException>()
.WithMessage(Environment.NewLine+ "The checked enumerable does not contain the expected value(s):" + Environment.NewLine + "\t[\"MaChaine{964}\"]" + Environment.NewLine + "The checked enumerable:" + Environment.NewLine + "\t[\"MaChaine{94}\"]" + Environment.NewLine + "The expected value(s):" + Environment.NewLine + "\t[\"MaChaine{964}\"]");
Expand Down

0 comments on commit b726cb6

Please sign in to comment.