public void ProxyFluentExportStrategyConfiguration_ExternallyOwned(FluentWithCtorConfiguration <int> configuration,
                                                                           IFluentExportStrategyConfiguration strategyConfiguration)
        {
            configuration.ExternallyOwned();

            strategyConfiguration.Received().ExternallyOwned();
        }
Exemple #2
0
        public void FluentExportMemberConfiguration_Generic_AsKeyed(FluentExportMemberConfiguration <BasicService> configuration,
                                                                    IFluentExportStrategyConfiguration <BasicService> fluentConfiguration)
        {
            configuration.AsKeyed <IBasicService>("Hello");

            fluentConfiguration.Received().AsKeyed <IBasicService>("Hello");
        }
        public void ProxyFluentExportStrategyConfiguration_AsKeyed(FluentWithCtorConfiguration <int> configuration,
                                                                   IFluentExportStrategyConfiguration strategyConfiguration)
        {
            configuration.AsKeyed(typeof(IBasicService), 'A');

            strategyConfiguration.Received().AsKeyed(typeof(IBasicService), 'A');
        }
        public void ProxyFluentExportStrategyConfiguration_As_Generic([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                      IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            configuration.As <IBasicService>();

            strategyConfiguration.Received().As <IBasicService>();
        }
        public void ProxyFluentExportStrategyConfiguration_ExternallyOwned([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                           IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            configuration.ExternallyOwned();

            strategyConfiguration.Received().ExternallyOwned();
        }
        public void ProxyFluentExportStrategyConfiguration_WithCtorCollectionParam([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                                   IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            configuration.WithCtorCollectionParam <IEnumerable <int>, int>();

            strategyConfiguration.Received().WithCtorCollectionParam <IEnumerable <int>, int>();
        }
        public void ProxyFluentExportStrategyConfiguration_WithPriority([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                        IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            configuration.WithPriority(10);

            strategyConfiguration.Received().WithPriority(10);
        }
Exemple #8
0
        public void FluentExportMemberConfiguration_Generic_As(FluentExportMemberConfiguration <BasicService> configuration,
                                                               IFluentExportStrategyConfiguration <BasicService> fluentConfiguration)
        {
            configuration.As(typeof(IBasicService));

            fluentConfiguration.Received().As(typeof(IBasicService));
        }
        public void ProxyFluentExportStrategyConfiguration_WithMetadata(FluentWithCtorConfiguration <int> configuration,
                                                                        IFluentExportStrategyConfiguration strategyConfiguration)
        {
            configuration.WithMetadata(5, 10);

            strategyConfiguration.Received().WithMetadata(5, 10);
        }
        public void ProxyFluentExportStrategyConfiguration_As([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                              IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            configuration.As(typeof(IBasicService));

            strategyConfiguration.Received().As(typeof(IBasicService));
        }
        public void ProxyFluentExportStrategyConfiguration_ImportMethods([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                         IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Expression <Action <BasicService> > action = service => service.TestMethod();

            configuration.ImportMethod(action);

            strategyConfiguration.Received().ImportMethod(action);
        }
        public void ProxyFluentExportStrategyConfiguration_WithCtorParam(FluentWithCtorConfiguration <int> configuration,
                                                                         IFluentExportStrategyConfiguration strategyConfiguration)
        {
            Func <int> func = () => 5;

            configuration.WithCtorParam(func);

            strategyConfiguration.Received().WithCtorParam(func);
        }
        public void ProxyFluentExportStrategyConfiguration_ByInterfaces(FluentWithCtorConfiguration <int> configuration,
                                                                        IFluentExportStrategyConfiguration strategyConfiguration)
        {
            Func <Type, bool> func = t => true;

            configuration.ByInterfaces(func);

            strategyConfiguration.Received().ByInterfaces(func);
        }
        public void ProxyFluentExportStrategyConfiguration_WithCtorParam([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                         IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Func <int> func = () => 5;

            configuration.WithCtorParam(func);

            strategyConfiguration.Received().WithCtorParam(func);
        }
        public void ProxyFluentExportStrategyConfiguration_EnrichWithDelegate([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                              IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Func <IExportLocatorScope, StaticInjectionContext, BasicService, BasicService> enrichmentDelegate = (scope, staticonctext, context) => new BasicService();

            configuration.EnrichWithDelegate(enrichmentDelegate);

            strategyConfiguration.Received().EnrichWithDelegate(enrichmentDelegate);
        }
        public void ProxyFluentExportStrategyConfiguration_DisposalCleanup([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                           IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Action <BasicService> func = service => service.TestMethod();

            configuration.DisposalCleanupDelegate(func);

            strategyConfiguration.Received().DisposalCleanupDelegate(func);
        }
        public void ProxyFluentExportStrategyConfiguration_ByInterfaces([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                        IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Func <Type, bool> func = type => true;

            configuration.ByInterfaces(func);

            strategyConfiguration.Received().ByInterfaces(func);
        }
        public void ProxyFluentExportStrategyConfiguration_Apply([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                 IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Action <BasicService> func = service => service.TestMethod();

            configuration.Apply(func);

            strategyConfiguration.Received().Apply(func);
        }
        public void ProxyFluentExportStrategyConfiguration_ImportMembers([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                         IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Func <MemberInfo, bool> func = info => true;

            configuration.ImportMembers(func);

            strategyConfiguration.Received().ImportMembers(func);
        }
        public void ProxyFluentExportStrategyConfiguration_ImportProperty([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                          IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Expression <Func <BasicService, int> > func = service => service.Count;

            configuration.ImportProperty(func);

            strategyConfiguration.Received().ImportProperty(func);
        }
        public void ProxyFluentExportStrategyConfiguration_WithCtorParam_Multi_5_Arg([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                                     IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Func <IExportLocatorScope, StaticInjectionContext, IInjectionContext, IBasicService, IMultipleService, int> func = (scope, staticContext, context, basic, multiple) => 5;

            configuration.WithCtorParam(func);

            strategyConfiguration.Received().WithCtorParam(func);
        }
        public void ProxyFluentExportStrategyConfiguration_WithCtorParam_Multi_1_Arg([Locate] FluentWithCtorConfiguration <BasicService, int> configuration,
                                                                                     IFluentExportStrategyConfiguration <BasicService> strategyConfiguration)
        {
            Func <IExportLocatorScope, int> func = (scope) => 5;

            configuration.WithCtorParam(func);

            strategyConfiguration.Received().WithCtorParam(func);
        }
        public void ProxyFluentExportStrategyConfiguration_ImportMembers(FluentWithCtorConfiguration <int> configuration,
                                                                         IFluentExportStrategyConfiguration strategyConfiguration)
        {
            Func <MemberInfo, bool> memberFunc = info => true;

            configuration.ImportMembers(memberFunc);

            strategyConfiguration.Received().ImportMembers(memberFunc);
        }