Exemple #1
0
        public void IsValid_IsValid_ExpectFalse()
        {
            var attr = new ExpectedAttribute(new[] { "Danger", "Mouse" }, true);

            attr.IsValid("Mouse")
            .Should()
            .BeTrue();
        }
Exemple #2
0
        public void GenerateMessage_True_ExpectNonNull()
        {
            var attr = new ExpectedAttribute(new[] { "Danger", "Mouse" }, true);

            attr.IsValid("Penfold");
            attr.ErrorMessage
            .Should()
            .NotBeNull();
        }
Exemple #3
0
 public AttributeTest(UnitTest ut)
 {
     this.ut = ut;
     attr    = (ExpectedAttribute)ut.GetType()
               .GetCustomAttributes(typeof(ExpectedAttribute), false)[0];
 }