示例#1
0
        public void DeletedRowMakesSnapshotUnequal()
        {
            //Arrange
            var before = MakeSnapshot("Test", 1, 5);
            var after  = MakeSnapshot("Test2", 2, 4);

            //Act
            var result = SnapshotDifferenceAnalyser.Match(_collection, before, after);

            //Assert
            result.Should().BeFalse();
        }
示例#2
0
        public void EqualSnapshotsReturnEqualStatus()
        {
            //Arrange
            var before = MakeSnapshot("Test");
            var after  = MakeSnapshot("Test2");

            //Act
            var result = SnapshotDifferenceAnalyser.Match(_collection, before, after);

            //Assert
            result.Should().BeTrue();
        }
示例#3
0
        public void NonKeyValueDifferenceMakesSnapshotUnequal()
        {
            //Arrange
            var before = MakeSnapshot("Test", 1, 1, MakeValueSet(5));
            var after  = MakeSnapshot("Test2", 1, 1, MakeValueSet(6));

            //Act
            var result = SnapshotDifferenceAnalyser.Match(_collection, before, after);

            //Assert
            result.Should().BeFalse();
        }
示例#4
0
        public void SnapshotShouldNotConsiderExcludedTables()
        {
            //Arrange
            var before = MakeSnapshot("Test", 1, 1, MakeValueSet(5));
            var after  = MakeSnapshot("Test2", 1, 1, MakeValueSet(6));

            _collection.DefineTable(TableName).ExcludeFromComparison();

            //Act
            var result = SnapshotDifferenceAnalyser.Match(_collection, before, after);

            //Assert
            result.Should().BeTrue(); //it can only be a match if the table is ignored
        }