示例#1
0
        public void PureValueTypeCanBeConstructed()
        {
            MockBuilderContext ctx = CreateContext();

            Assert.AreEqual(0, ctx.HeadOfChain.BuildUp(ctx, typeof(int), null, null));
        }
        public void ThrowsIfConcreteTypeToCreateCannotBeCreated()
        {
            MockBuilderContext context = CreateContext();

            context.HeadOfChain.BuildUp(context, typeof(MockDependsOnInterface), null, null);
        }
        public void StrategyThrowsIfNamedObjectNotPresent()
        {
            MockBuilderContext context = CreateContext();

            context.HeadOfChain.BuildUp(context, typeof(NamedThrowingMockObject), null, null);
        }
        public void SpecifyingCreateNewAndDependencyThrows()
        {
            MockBuilderContext context = CreateContext();

            context.HeadOfChain.BuildUp(context, typeof(MockInvalidDualAttributes), null, null);
        }
        public void SpecifyingMultipleConstructorsThrows()
        {
            MockBuilderContext context = CreateContext();

            context.HeadOfChain.BuildUp(context, typeof(MockInvalidDualConstructorAttributes), null, null);
        }
        public void CanCreateValueTypesWithConstructorInjectionStrategyInPlace()
        {
            MockBuilderContext context = CreateContext();

            Assert.AreEqual(0, context.HeadOfChain.BuildUp(context, typeof(int), null, null));
        }