Exemplo n.º 1
0
        public void select_greediest_constructor_that_can_be_filled()
        {
            theServices.AddTransient <IWidget, AWidget>();
            theServices.AddSingleton(this);
            theServices.AddTransient <IGeneratedMethod, GeneratedMethod>();
            theServices.AddTransient <IWidget, MoneyWidget>();

            var ctor = theGraph.ChooseConstructor(typeof(DeepConstructorGuy));

            ctor.GetParameters().Select(x => x.ParameterType)
            .ShouldHaveTheSameElementsAs(typeof(IWidget), typeof(IGeneratedMethod));
        }