public CustomConvention()
        {
            Classes
            .NameEndsWith("Tests");

            HideExceptionDetails
            .For <Exception>()
            .For(typeof(Shouldly.ShouldBeStringTestExtensions));
        }
Esempio n. 2
0
        public SelfTestConvention()
        {
            Classes
            .NameEndsWith("Tests")
            .InTheSameNamespaceAs(typeof(SelfTestConvention))
            .Where(type => type.HasOnlyDefaultConstructor());

            Methods.Where(method => method.IsPublic && method.IsVoid());

            Parameters
            .Add <InputAttributeParameterSource>();

            HideExceptionDetails
            .For <ShouldAssertException>()
            .For <ShouldCompleteInException>();
        }
Esempio n. 3
0
        public UnitTestConvention()
        {
            Classes
            .NameEndsWith("Tests")
            .Where(type => type.GetConstructors()
                   .All(constructorInfo => !constructorInfo.GetParameters().Any()));

            Methods.Where(method => method.IsPublic && method.IsVoid());

            Parameters
            .Add <InputAttributeParameterSource>()
            .Add <AutoFixtureParameterSource>();

            HideExceptionDetails
            .For <ShouldAssertException>()
            .For <ShouldCompleteInException>();
        }