Пример #1
0
        public void MustHaveAttributeConventionSpecification_FailsIfAttributeDoesNotExist()
        {
            var result = typeof(MockWithoutAttribute)
                         .MustConformTo(Convention.MustHaveAttribute(typeof(MockAttribute)));

            result.IsSatisfied.Should().BeFalse();
            result.Failures.Should().HaveCount(1);
        }
Пример #2
0
 public void MustHaveAttributeConventionSpecification_Success()
 {
     typeof(MockWithAttribute)
     .MustConformTo(Convention.MustHaveAttribute(typeof(MockAttribute)))
     .IsSatisfied
     .Should()
     .BeTrue();
 }