public void NoDecoratedConstructors() { MockBuilderContext context = new MockBuilderContext(); ConstructorReflectionStrategy strategy = new ConstructorReflectionStrategy(); strategy.BuildUp(context, typeof(Undecorated), null); ICreationPolicy policy = context.Policies.Get <ICreationPolicy>(typeof(Undecorated)); Undecorated undecorated = Assert.IsType <Undecorated>(policy.Create(context, typeof(Undecorated))); Assert.True(undecorated.Constructor__Called); }
public void NoDecoratedConstructors() { MockBuilderContext context = new MockBuilderContext(); ConstructorReflectionStrategy <InjectionConstructorAttribute, DependencyAttribute> strategy = new ConstructorReflectionStrategy <InjectionConstructorAttribute, DependencyAttribute>(); context.Strategies.Add(strategy); context.ExecuteBuildUp(typeof(Undecorated), null); ICreationPolicy policy = context.Policies.Get <ICreationPolicy>(typeof(Undecorated)); Undecorated undecorated = AssertHelper.IsType <Undecorated>(policy.Create(context, typeof(Undecorated))); Assert.IsTrue(undecorated.Constructor__Called); }