Inheritance: IEqualityComparer
        public void DifferencesAreEnumerated()
        {
            //Arrange
            var first  = GetRow(1);
            var second = GetRow(2);

            first["Variable"]   = 1;
            second["Variable"]  = 2;
            first["Variable2"]  = "before";
            second["Variable2"] = "after";
            first["Match"]      = "same"; //no difference, so not in the output
            second["Match"]     = "same"; //no difference, so not in the output

            var key = new SnapshotRowKey(first.Row, _tableDef);

            //Act
            var result = RowDataComparer.Compare(_tableDef, key, first.Row, second.Row); //note: Keys are different but they are not compared

            //Assert
            var output = new Output();

            output.WrapLine($"Matched = {result.Matched}");
            output.WriteLine();
            output.FormatTable(result.Differences);
            output.Report.Verify();
        }
        public void DifferentRowsCompareUnequal()
        {
            //Arrange
            var first  = GetRow(1);
            var second = GetRow(2);

            first["Variable"]  = 1;
            second["Variable"] = 2;

            var key = new SnapshotRowKey(first.Row, _tableDef);

            //Act
            var result = RowDataComparer.Compare(_tableDef, key, first.Row, second.Row); //note: Keys are different but they are not compared

            //Assert
            result.Matched.Should().BeFalse();
        }
        public void ExcludedFieldsAreNotCompared()
        {
            //Arrange
            _tableDef.ExcludeColumnFromComparison("Variable");
            var first  = GetRow(1);
            var second = GetRow(2);

            first["Variable"]   = 1;
            second["Variable"]  = 2;
            first["Variable2"]  = "before";
            second["Variable2"] = "after";
            first["Match"]      = "same"; //no difference, so not in the output
            second["Match"]     = "same"; //no difference, so not in the output

            var key = new SnapshotRowKey(first.Row, _tableDef);

            //Act
            var result = RowDataComparer.Compare(_tableDef, key, first.Row, second.Row); //note: Keys are different but they are not compared

            //Assert
            result.Differences.Any(d => d.Name == "Variable").Should().BeFalse();
        }