public void PrepareToComposeUsingConstructorWithNullConstructorSelector() { var container = new ComponentContainer(); var composer = new ReflectionComponentComposer(container); Assert.Throws <ArgumentNullException>(() => composer.PrepareToComposeUsingConstructor(typeof(TestComponent), null)); }
public void PrepareToComposeUsingConstructor() { var container = new ComponentContainer(); var composer = new ReflectionComponentComposer(container); var constructorSelector = new LargestConstructorSelector(); var componentType = typeof(TestComponent); composer.PrepareToComposeUsingConstructor(componentType, constructorSelector); var isPrepared = composer.IsPreparedToComposeUsingConstructor(componentType, constructorSelector); Assert.True(isPrepared); }