public CustomConvention() { Classes .NameEndsWith("Tests"); HideExceptionDetails .For <Exception>() .For(typeof(Shouldly.ShouldBeStringTestExtensions)); }
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>(); }
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>(); }