Closed ipjohnson closed 8 years ago
public class CustomizationAttribute : FixtureInitializationAttribute { private Type[] _types; public CustomizationAttribute(params Type[] types) { _types = types; } public override void Initialize(Fixture fixture) { foreach(var type in _types) { object initializer = fixture.Locate(type); if(initializer is IConvention) { fixture.Add(initializer as IConvention); } else if(initializer is IFixtureCustomization) { fixture.Add(initializer as IFixtureCustomization); } } } }
This has been released as part of 1.4.5