/// <summary> /// Initializes a new instance of the <see cref="ExtensionConfigurationSectionBehavior"/> class. /// </summary> /// <param name="factory">The factory which creates the necessary dependencies.</param> public ExtensionConfigurationSectionBehavior(IExtensionConfigurationSectionBehaviorFactory factory) { Ensure.ArgumentNotNull(factory, "factory"); this.factory = factory; this.reflectExtensionProperties = this.factory.CreateReflectExtensionProperties(); this.assignExtensionProperties = this.factory.CreateAssignExtensionProperties(); }
public ExtensionConfigurationSectionBehaviorTest() { this.consumer = A.Fake <IConsumeConfiguration>(); this.extensionPropertyReflector = A.Fake <IReflectExtensionProperties>(); this.sectionNameProvider = A.Fake <IHaveConfigurationSectionName>(); this.sectionProvider = A.Fake <ILoadConfigurationSection>(); this.conversionCallbacksProvider = A.Fake <IHaveConversionCallbacks>(); this.defaultConversionCallbackProvider = A.Fake <IHaveDefaultConversionCallback>(); this.assigner = A.Fake <IAssignExtensionProperties>(); this.factory = A.Fake <IExtensionConfigurationSectionBehaviorFactory>(); this.SetupAutoStubFactory(); this.extensions = new List <IExtension> { A.Fake <IExtension>(), }; this.testee = new ExtensionConfigurationSectionBehavior(this.factory); }