public void EqualConstraintUsingDoesNotThrow() { var constraint = new SomeItemsConstraint(new EqualConstraint("42")); Assert.DoesNotThrow(() => constraint.Using((IComparer <string>)Comparer <string> .Default)); }
public void AnotherConstraintUsingThrows() { var constraint = new SomeItemsConstraint(new EmptyCollectionConstraint()); Assert.Throws <ArgumentException>(() => constraint.Using((IComparer <string>)Comparer <string> .Default)); }
public static SomeItemsConstraint UsingCodeFragmentComparer(this SomeItemsConstraint constraint) => constraint.Using(Comparer);