Created
September 12, 2014 23:57
-
-
Save urasandesu/14efc15fe00e6ed41bdd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using FluentAssertions; | |
| using NUnit.Framework; | |
| using System.Collections.Generic; | |
| namespace ClassLibrary | |
| { | |
| [TestFixture] | |
| public class FluentAssertionsSample | |
| { | |
| [Test] | |
| public void ShouldBeEquivalentTo_should_be_make_easily_understandable_message_for_IDictionaryOfTKeyOfTValue() | |
| { | |
| var expected = new SortedDictionary<string, string>() { { "orange", "1" }, { "apple", "4" }, { "cucumber", "6" } }; | |
| expected["banana"] = "7"; | |
| expected["pineapple"] = "7"; | |
| var actual = new SortedDictionary<string, string>() { { "orange", "1" }, { "apple", "4" }, { "cucumber", "6" } }; | |
| actual["banana"] = "6"; | |
| actual["pineapple"] = "7"; | |
| actual.ShouldBeEquivalentTo(expected); | |
| // PS Debug> & "C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console.exe" ClassLibrary.dll /domain=None /framework=v4.0 | |
| // NUnit-Console version 2.6.3.13283 | |
| // Copyright (C) 2002-2012 Charlie Poole. | |
| // Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. | |
| // Copyright (C) 2000-2002 Philip Craig. | |
| // All Rights Reserved. | |
| // | |
| // Runtime Environment - | |
| // OS Version: Microsoft Windows NT 6.2.9200.0 | |
| // CLR Version: 2.0.50727.8009 ( Net 3.5 ) | |
| // | |
| // ProcessModel: Default DomainUsage: None | |
| // Execution Runtime: v4.0 | |
| // .F | |
| // Tests run: 1, Errors: 0, Failures: 1, Inconclusive: 0, Time: 0.188947047319295 seconds | |
| // Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0 | |
| // | |
| // Errors and Failures: | |
| // 1) Test Failure : ClassLibrary.FluentAssertionsSample.ShouldBeEquivalentTo_should_be_make_easily_understandable_message_for_IDictionaryOfTKeyOfTValue | |
| // Expected pair[banana] to be "7", but "6" differs near "6" (index 0). | |
| // | |
| // With configuration: | |
| // - Include only the declared properties | |
| // - Match property by name (or throw) | |
| // | |
| // 場所 FluentAssertions.Execution.LateBoundTestFramework.Throw(String message) 場所 z:\Builds\work\d21bade4fe20a99b\Shared\Execution\LateBoundTestFramework.cs:行 25 | |
| // 場所 FluentAssertions.Execution.CollectingAssertionStrategy.ThrowIfAny(IDictionary`2 context) 場所 z:\Builds\work\d21bade4fe20a99b\FluentAssertions.Core\Execution\CollectingAssertionStrategy.cs:行 58 | |
| // 場所 FluentAssertions.Execution.AssertionScope.Dispose() 場所 z:\Builds\work\d21bade4fe20a99b\FluentAssertions.Core\Execution\AssertionScope.cs:行 267 | |
| // 場所 FluentAssertions.Equivalency.EquivalencyValidator.AssertEquality(EquivalencyValidationContext context) 場所 z:\Builds\work\d21bade4fe20a99b\FluentAssertions.Core\Equivalency\EquivalencyValidator.cs:行 59 | |
| // 場所 FluentAssertions.AssertionExtensions.ShouldBeEquivalentTo[T](T subject, Object expectation, String because, Object[] reasonArgs) 場所 z:\Builds\work\d21bade4fe20a99b\Shared\AssertionExtensions.cs:行 504 | |
| // 場所 ClassLibrary.FluentAssertionsSample.ShouldBeEquivalentTo_should_be_make_easily_understandable_message_for_IDictionaryOfTKeyOfTValue() 場所 c:\Users\Akira\Documents\Visual Studio 2013\Projects\ClassLibrary\ClassLibrary\Class1.cs:行 20 | |
| // | |
| // | |
| // PS Debug> | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment