Beispiel #1
0
        public void ValueDifferenceGivesDetailsOnFailureWithShorterEnums()
        {
            var result = DifferenceFinders.ValueDifference(new List <List <int> > {
                this.a
            }, "a", this.list);

            Check.That(result[0].FirstName).IsEqualTo("a[1]");
            result = DifferenceFinders.ValueDifference(this.list, "a", new List <List <int> > {
                this.a
            });
            Check.That(result[0].FirstName).IsEqualTo("a[1]");
        }
Beispiel #2
0
        public void ValueDifferenceGivesDetailsOnFailure()
        {
            // List contains new instances of lists same as a and b

            var result = DifferenceFinders.ValueDifference(this.a, "a", this.b);

            Check.That(result.GetCount()).IsEqualTo(2);
            Check.That(result[0].FirstName).IsEqualTo("a[0]");
            Check.That(result[0].FirstValue).IsEqualTo(1);
            Check.That(result[0].SecondValue).IsEqualTo(3);

            result = DifferenceFinders.ValueDifference(this.a, "a", this.a);
            Check.That(result.GetCount()).IsEqualTo(0);

            result = DifferenceFinders.ValueDifference(this.list, "a", new List <List <int> > {
                this.a, this.a
            });
            Check.That(result[0].FirstName).IsEqualTo("a[1][0]");
        }
Beispiel #3
0
        public void ValueDifferenceReturnsEmptyIfEqual()
        {
            var result = DifferenceFinders.ValueDifference(this.a, "a", this.a);

            Check.That(result.GetCount()).IsEqualTo(0);
        }