Skip to content

Instantly share code, notes, and snippets.

@scichelli
scichelli / ExpectedObjects_ShouldEqual_vs_ShouldMatch_with_partial_objects.cs
Created July 5, 2011 21:02
First two fail (as expected), but with an unexpected error message, e.g., "For Customer, expected <>f__AnonymousType3`1[System.String]:[{ Name = Expected Name }] but found ExpectedObjectsAssertions.Customer."
[TestFixture]
public class When_testing_equivalence_or_matching_for_partially_supplied_properties
{
private const string ExpectedName = "Expected Name";
private Customer _actual;
private ExpectedObject _expected;
[Test]
public void Should_flag_extra_properties_on_actual_object_as_unequal()
{