예제 #1
0
        public void ShouldFailStaticFieldsAssertionIfAssemblyContainsAtLeastOneStaticField()
        {
            var assembly = typeof(RecordedAssertionsSpecification).Assembly;

            var e = Assert.Throws <AssertionException>(() => XAssert.NoStaticFields(assembly));

            StringAssert.Contains("_lolek", e.Message);
            StringAssert.Contains("_gieniek", e.Message);
            StringAssert.Contains("StaticProperty", e.Message);
        }
예제 #2
0
 public void NoStaticFields(Assembly assembly)
 {
     LogException(() => XAssert.NoStaticFields(assembly));
 }