Comments: ** Comment from web user: bjarke **
The following example shows the problem.
==============================================================
namespace FluentAssertions.specs
{
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class IncludingNestedObjects
{
[TestMethod]
public void Test()
{
var f1 = new Foo {Bars = new List<Bar> {new Bar()}};
var f2 = new Foo {Bars = new List<Bar> {new Bar()}};
f1.ShouldHave().AllProperties().IncludingNestedObjects().EqualTo(f2);
}
public class Bar
{
}
public class Foo
{
public List<Bar> Bars { get; set; }
}
}
}
==============================================================
The test fails with the message:
==============================================================
Expected property Bars to be equal to {
FluentAssertions.specs.IncludingNestedObjects+Bar
{
}}, but {
FluentAssertions.specs.IncludingNestedObjects+Bar
{
}} differs at index 0.
==============================================================