public SingleInterfaceBindingGeneratorTests() { this.kernelMock = new KernelMock(); this.bindableInterfaceSelectorMock = new Mock<IBindableTypeSelector>(); var bindingGeneratorFactory = new BindingGeneratorFactory(this.bindableInterfaceSelectorMock.Object); this.testee = bindingGeneratorFactory.CreateSingleInterfaceBindingGenerator(); }
public AllInterfacesBindingGeneratorTests() { this.kernel = new Mock<IKernel>().Object; this.bindableInterfaceSelectorMock = new Mock<IBindableTypeSelector>(); this.multiBindingCreatorMock = new Mock<IBindingCreator>(); this.testee = new AllInterfacesBindingGenerator(this.bindableInterfaceSelectorMock.Object, this.multiBindingCreatorMock.Object); }
public BaseBindingGeneratorTests() { this.kernelMock = new KernelMock(); var bindingGeneratorFactory = new BindingGeneratorFactory(null); this.testee = bindingGeneratorFactory.CreateBaseBindingGenerator(); }
public AllInterfacesBindingGeneratorTests() { this.kernel = new Mock <IKernel>().Object; this.bindableInterfaceSelectorMock = new Mock <IBindableTypeSelector>(); this.multiBindingCreatorMock = new Mock <IBindingCreator>(); this.testee = new AllInterfacesBindingGenerator(this.bindableInterfaceSelectorMock.Object, this.multiBindingCreatorMock.Object); }
public SingleInterfaceBindingGeneratorTests() { this.kernelMock = new KernelMock(); this.bindableInterfaceSelectorMock = new Mock <IBindableTypeSelector>(); var bindingGeneratorFactory = new BindingGeneratorFactory(this.bindableInterfaceSelectorMock.Object); this.testee = bindingGeneratorFactory.CreateSingleInterfaceBindingGenerator(); }
public DefaultInterfacesBindingGeneratorTests() { this.kernelMock = new KernelMock(); this.bindableInterfaceSelectorMock = new Mock<IBindableTypeSelector>(); this.multiBindingCreatorMock = new Mock<IBindingCreator>(); var bindingGeneratorFactory = new TestBindingGeneratorFactory( this.bindableInterfaceSelectorMock.Object, this.multiBindingCreatorMock.Object); this.testee = bindingGeneratorFactory.CreateDefaultInterfacesBindingGenerator(); }
public DefaultInterfaceBindingGeneratorTests() { this.kernelMock = new KernelMock(); this.bindableInterfaceSelectorMock = new Mock <IBindableTypeSelector>(); this.multiBindingCreatorMock = new Mock <IBindingCreator>(); var bindingGeneratorFactory = new TestBindingGeneratorFactory( this.bindableInterfaceSelectorMock.Object, this.multiBindingCreatorMock.Object); this.testee = bindingGeneratorFactory.CreateDefaultInterfaceBindingGenerator(); }
/// <summary> /// Creates the bindings using the specified generator. /// </summary> /// <param name="generator">The generator to use to create the bindings.</param> public void BindWith(IBindingGenerator generator) { if (generator == null) { throw new ArgumentNullException("generator"); } this.CreateTypeList(); foreach (var type in this.types) { this.bindingSyntax[type] = generator.CreateBindings(type, this.bindingRoot).ToList(); } }
/// <summary> /// Bind using a custom binding generator. /// </summary> /// <param name="generator">The generator used to create the bindings.</param> /// <returns>The fluent syntax</returns> public IConfigureSyntax BindWith(IBindingGenerator generator) { this.bindingBuilder.BindWith(generator); return(this); }
public CountingInterfaceBindingGenerator() { this.innerBindingGenerator = new AllInterfacesBindingGenerator(new BindableTypeSelector(), new SingleConfigurationBindingCreator()); }