Exemplo n.º 1
0
 public void SetUp()
 {
     Matcher     = new StartsWithConstraint("hello").IgnoreCase;
     GoodValues  = new object[] { "Hello", "HELLO there" };
     BadValues   = new object[] { "goodbye", "What the hell?", "I said hello", "say Hello to fred", string.Empty, null };
     Description = "String starting with \"hello\", ignoring case";
 }
Exemplo n.º 2
0
 public void SetUp()
 {
     Matcher = new StartsWithConstraint("hello");
     GoodValues = new object[] { "hello", "hello there" };
     BadValues = new object[] { "goodbye", "What the hell?", "I said hello", "say hello to fred", string.Empty, null };
     Description = "String starting with \"hello\"";
 }
Exemplo n.º 3
0
 public void SetUp()
 {
     Matcher     = new StartsWithConstraint("hello");
     GoodValues  = new object[] { "hello", "hello there" };
     BadValues   = new object[] { "goodbye", "What the hell?", "I said hello", "say hello to fred", string.Empty, null };
     Description = "String starting with \"hello\"";
 }
Exemplo n.º 4
0
 protected override void SetUp()
 {
     Matcher     = new StartsWithConstraint("hello").IgnoreCase;
     GoodValues  = new object[] { "Hello", "HELLO there" };
     BadValues   = new object[] { "goodbye", "What the hell?", "I said hello", "say Hello to fred", string.Empty, null };
     Description = "\"hello\"";
 }
        public void ShouldNotBePossibleEvaluateRuleWithStartsWithConstraintAndNullValue()
        {
            var constraint = new StartsWithConstraint("Name", "John");
            var result     = constraint.Evaluate(ObjectHelper.ToDictionary(new
            {
                Name = (string)null
            }));

            Assert.False(result);
        }
 public void SetUp()
 {
     theConstraint        = new StartsWithConstraint("hello").IgnoreCase;
     expectedDescription  = "String starting with \"hello\", ignoring case";
     stringRepresentation = "<startswith \"hello\">";
 }
Exemplo n.º 7
0
 public void SetUp()
 {
     Matcher = new StartsWithConstraint("hello").IgnoreCase;
     GoodValues = new object[] { "Hello", "HELLO there" };
     BadValues = new object[] { "goodbye", "What the hell?", "I said hello", "say Hello to fred", string.Empty, null };
     Description = "String starting with \"hello\", ignoring case";
 }
 public void SetUp()
 {
     theConstraint = new StartsWithConstraint("hello").IgnoreCase;
     expectedDescription = "String starting with \"hello\", ignoring case";
     stringRepresentation = "<startswith \"hello\">";
 }