Exemple #1
0
        public void UsesProvidedIComparer()
        {
            SimpleObjectComparer comparer = new SimpleObjectComparer();

            Assert.That(2 + 2, Is.EqualTo(4).Using(comparer));
            Assert.That(comparer.Called, "Comparer was not called");
        }
Exemple #2
0
        public void UsesProvidedIComparer()
        {
            SimpleObjectComparer comparer = new SimpleObjectComparer();

            Assert.That(rangeConstraint.Using(comparer).Matches(19));
            Assert.That(comparer.Called, "Comparer was not called");
        }
Exemple #3
0
        public void UsesProvidedIComparer()
        {
            SimpleObjectComparer comparer = new SimpleObjectComparer();

            ComparisonConstraint.Using(comparer).ApplyTo(0);
            Assert.That(comparer.Called, "Comparer was not called");
        }
Exemple #4
0
        public void SetUp()
        {
            IComparer comparer = new SimpleObjectComparer();

            parseTree       = "<ordered descending NUnit.TestUtilities.SimpleObjectComparer>";
            staticSyntax    = Is.Ordered.Using(comparer).Descending;
            inheritedSyntax = Helper().Ordered.Using(comparer).Descending;
            builderSyntax   = Builder().Ordered.Using(comparer).Descending;
        }