public When_comparing_dynamic_objects()
        {
            var item1 = new DynamicObject(typeof(A))
            {
                { "Int32Value", 1 },
                { "StringValue", "S1" },
            };

            var item2 = new DynamicObject(typeof(A))
            {
                { "Int32Value", 2 },
                { "StringValue", "S2" },
            };

            result = new GraphComparer().Compare(item1, item2);
        }
 public SimpleComparisonResult(ComparisonResult comparisonResult)
 {
     _comparisonResult = comparisonResult;
     _deltas = new Lazy<IEnumerable<SimpleDelta>>(() => _comparisonResult.Deltas.Select(x => new SimpleDelta(x)).ToList());
 }
        public When_comparing_nested_changes_with_display_string_attributes()
        {
            var item1 = new L0
            {
                Version = N.One,
                MinorVersion = null,
                L1Property = new L1
                {
                    NameProperty = "test name",
                    L2Property = new L2
                    {
                        ValueProperty = 10,
                        Collection1Property = new[]
                        {
                            new V { XProperty = "x1" },
                            new V { XProperty = "x2" },
                        },
                        Collection2Property = new[]
                        {
                            1,
                            2,
                        },
                        Collection3Property = new[]
                        {
                            N.One,
                            N.Two,
                        },
                    }
                }
            };

            var item2 = new L0
            {
                Version = N.Two,
                MinorVersion = N.One,
                L1Property = new L1
                {
                    NameProperty = "new test name",
                    L2Property = new L2
                    {
                        ValueProperty = 20,
                        Collection1Property = new[]
                        {
                            new V { XProperty = "x1" },
                            new V { XProperty = "x3" },
                        },
                        Collection2Property = new[]
                        {
                            1,
                            3,
                        },
                        Collection3Property = new[]
                        {
                            N.One,
                            N.Three,
                        },
                    }
                }
            };

            result = new GraphComparer().Compare(item1, item2);
        }
        public When_comparing_anonymous_types()
        {
            var item1 = new
            {
                Name = "test name",
                Value = 1.23456789m,
                Collection1 = new[]
                {
                    new { X = "x1" },
                    new { X = "x2" },
                    new { X = "x3" },
                },
                Collection2 = new[]
                {
                    new { Y = "y1" },
                    new { Y = "y2" },
                },
                Collection3 = new[]
                {
                    "z1",
                    "z2"
                },
                Collection4 = new[]
                {
                    "z1",
                    "z2"
                },
                Collection5 = (int[])null,
                Collection6 = new[]
                {
                    1,
                    2
                },
            };

            var item2 = new
            {
                Name = "test new name",
                Value = "abc",
                Collection1 = new[]
                {
                    new { X = "x1" },
                    new { X = "x2" },
                    new { X = "x3" },
                },
                Collection2 = new[]
                {
                    new { Y = "y1" },
                    new { Y = "y3" },
                },
                Collection3 = new[]
                {
                    "z1",
                    "z3"
                },
                Collection4 = (string[])null,
                Collection5 = new[]
                {
                    1,
                    2
                },
                Collection6 = new[]
                {
                    1,
                    3
                },
            };

            result = new GraphComparer().Compare(item1, item2);
        }