Exemplo n.º 1
0
        public void IsValid_IsValid_ExpectFalse()
        {
            var attr = new ExpectedAttribute(new[] { "Danger", "Mouse" }, true);

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

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