コード例 #1
0
        public void EqualConstraintUsingDoesNotThrow()
        {
            var constraint = new SomeItemsConstraint(new EqualConstraint("42"));

            Assert.DoesNotThrow(() => constraint.Using((IComparer <string>)Comparer <string> .Default));
        }
コード例 #2
0
        public void AnotherConstraintUsingThrows()
        {
            var constraint = new SomeItemsConstraint(new EmptyCollectionConstraint());

            Assert.Throws <ArgumentException>(() => constraint.Using((IComparer <string>)Comparer <string> .Default));
        }
コード例 #3
0
 public static SomeItemsConstraint UsingCodeFragmentComparer(this SomeItemsConstraint constraint) =>
 constraint.Using(Comparer);