Ejemplo n.º 1
0
        public void SequenceEqualityWithoutOrderGetsExpectedResults(int[] a, int[] b, bool match)
        {
            var comparer = PipelineComparers.IgnoreOrderSequenceEqualityComparer(EqualityComparer <int> .Default);

            Assert.AreEqual(match, comparer.Equals(a, b));
            Assert.AreEqual(match, comparer.Equals(b, a));
        }
Ejemplo n.º 2
0
        public void EqualityCheckComparerUsesTheSuppliedFunction(int a, int b, bool result)
        {
            var comparer = PipelineComparers.Equality <int>((x, y) => result);

            Assert.AreEqual(result, comparer.Equals(a, b));
        }