コード例 #1
0
            public void Given_a_tablePair_and_a_CompareResult_then_First_Second_and_Detail_delegates_on_them()
            {
                // Arrange
                var pair = new Pair<Table>(new Table("irrelevant"), new Table("irrelevant"));
                var compareResult = new CompareResult();

                // Act
                var conflict = new SpecificationConflict(pair, compareResult);

                // Assert
                Assert.That(conflict.Detail, Is.SameAs(compareResult));
                Assert.That(conflict.First, Is.EqualTo(pair.First));
                Assert.That(conflict.Second, Is.EqualTo(pair.Second));
            }
コード例 #2
0
            public void When_no_value_added()
            {
                // Arrange
                CompareResult compareResult = new CompareResult();

                // Assert
                Assert.That(compareResult.HaveValues, Is.False);
            }
コード例 #3
0
            public void When_a_missing_column_added()
            {
                // Arrange
                CompareResult compareResult = new CompareResult();
                compareResult.AddMissing(Column.Create("irrelevant"));

                // Assert
                Assert.That(compareResult.HaveValues, Is.True);
            }
コード例 #4
0
            public void When_a_conflict_column_added()
            {
                // Arrange
                CompareResult compareResult = new CompareResult();
                var pair = new Pair<Table>(new Table("irrelevant"), new Table("irrelevant too"));
                compareResult.AddConflict(new SpecificationConflict(pair)); //todo: good candidate for mock

                // Assert
                Assert.That(compareResult.HaveValues, Is.True);
            }