public void CtorSource_CallsCtor_RequestsArguments_From_Session()
        {
            var source = new CtorSource<TestCtorObject>(
                    typeof(TestCtorObject).GetConstructor(new[] { typeof(TestDependency) })
                );

            var context = new Mock<IGenerationContext>();
            context.Setup(x => x.Next<TestDependency>()).Returns(new TestDependency());

            var result = source.Next(context.Object);
            Assert.NotNull(result.Dependency);
        }
        public void CtorSource_CallsCtor_RequestsArguments_From_Session()
        {
            var source = new CtorSource <TestCtorObject>(
                typeof(TestCtorObject).GetConstructor(new[] { typeof(TestDependency) })
                );

            var context = new Mock <IGenerationContext>();

            context.Setup(x => x.Next <TestDependency>()).Returns(new TestDependency());

            var result = source.Next(context.Object);

            Assert.NotNull(result.Dependency);
        }