Beispiel #1
0
        protected override void Creating()
        {
            var options = new ContractGeneratorOptionsBuilder();

            if (GivensDefined("AsPublicWasCalled"))
            {
                options.WithPublic();
            }

            if (GivensDefined("Exclude"))
            {
                options.ExcludeMembersDeclaredOn(Given.Exclude);
            }

            Then.Container = new WrappedTypeContainer(null, Given.CustomNamingStrategy);
            Then.Container.Register(Given.Type);
            Then.Target = new ContractGenerator(options.Build(), Then.Container);
        }
Beispiel #2
0
        protected override void Creating()
        {
            var contractOptions = new ContractGeneratorOptionsBuilder();
            var typeOptions     = new TypeGeneratorOptionsBuilder();

            if (GivensDefined("AsPublicWasCalled"))
            {
                contractOptions.WithPublic();
                typeOptions.WithPublic();
            }

            Then.Container = new WrappedTypeContainer(Given.CustomNamingStrategy);
            Then.Container.Register <SomeType>();

            Then.TypeGenerator     = new TypeGenerator(typeOptions.Build(), Then.Container);
            Then.ContractGenerator = new ContractGenerator(contractOptions.Build(), Then.Container);

            Then.Target = new AutoWrapper.CodeGen.CodeGenerator();
        }