public void PrepareCompositionWithNullConstructorSelector() { Assert.Throws <ArgumentNullException>( () => { var component = new SingletonComponent <ITestComponent, TestComponent>(); component.PrepareComposition(this.Composer, null); }); }
public void PrepareComposition() { var composer = Mock.Of <IComponentComposer>(); var component = new SingletonComponent <ITestComponent, TestComponent>(); component.PrepareComposition(composer, this.ConstructorSelector); var mockComposer = Mock.Get(composer); mockComposer.Verify( c => c.PrepareToComposeUsingConstructor(typeof(TestComponent), this.ConstructorSelector), Times.Once); }