public void ItemIsPresent_WithEqualityComparer() { Func <string, string, bool> comparer = (expected, actual) => actual.Contains(expected); var anyOf = new AnyOfConstraint(new[] { "A", "B", "C" }).Using(comparer); Assert.That(anyOf.ApplyTo("1. A").Status, Is.EqualTo(ConstraintStatus.Success)); }
public void SetUp() { TheConstraint = new AnyOfConstraint(new object[] { 1, 2, 3 }); ExpectedDescription = "any of < 1, 2, 3 >"; StringRepresentation = "<anyof 1 2 3>"; }
public void ItemIsPresent_IgnoreCase() { var anyOf = new AnyOfConstraint(new[] { "a", "B", "ab" }).IgnoreCase; Assert.That(anyOf.ApplyTo("AB").Status, Is.EqualTo(ConstraintStatus.Success)); }
public void SetUp() { theConstraint = new AnyOfConstraint(new[] { 1, 2, 3 }); expectedDescription = "any of < 1, 2, 3 >"; stringRepresentation = "<anyof 1 2 3>"; }