Example #1
0
        public SpringBootstrapper NewSpringBootstrapper(LoggerSetter loggerSetter)
        {
            SpringBootstrapperImpl springBootstrapper = new SpringBootstrapperImpl();

            loggerSetter.Add(springBootstrapper);
            return(springBootstrapper);
        }
Example #2
0
        public AssemblyResolver NewAssemblyResolver(LoggerSetter loggerSetter)
        {
            AssemblyResolverImpl assemblyResolver = new AssemblyResolverImpl();

            loggerSetter.Add(assemblyResolver);
            return(assemblyResolver);
        }
Example #3
0
        public Runner NewSpringRunner(LoggerSetter loggerSetter, SpringBootstrapper springBootstrapper)
        {
            SpringRunnerImpl runner = new SpringRunnerImpl();

            runner.SpringBootstrapper = springBootstrapper;
            loggerSetter.Add(runner);
            return(runner);
        }
Example #4
0
        public CompositeBootstrapper NewCompositeBootstrapper(LoggerSetter loggerSetter, IList <Bootstrapper> bootstrappers)
        {
            CompositeBootstrapperImpl compositeBootstrapper = new CompositeBootstrapperImpl();

            compositeBootstrapper.SubBootstrappers = bootstrappers;
            loggerSetter.Add(compositeBootstrapper);
            return(compositeBootstrapper);
        }
        //public AssemblyResolver NewAssemblyResolver(LoggerSetter loggerSetter) {
        //    AssemblyResolverImpl assemblyResolver = new AssemblyResolverImpl();
        //    loggerSetter.Add(assemblyResolver);
        //    return assemblyResolver;
        //}

        public SpringBootstrapper NewSpringBootstrapper(LoggerSetter loggerSetter, string xmlFile = null)
        {
            SpringBootstrapperImpl springBootstrapper = new SpringBootstrapperImpl();

            springBootstrapper.XmlFile = xmlFile;
            loggerSetter.Add(springBootstrapper);
            return(springBootstrapper);
        }
Example #6
0
        public void TestBootstrap()
        {
            BootstrapperFactory bootstrapperFactory = new BootstrapperFactoryImpl();
            LoggerSetter        loggerSetter        = Log4netFactory.NewLoggerSetter();

            loggerSetter.Add(MockLoggerRecipient);
            loggerSetter.Bootstrap();
            Assert.IsNotNull(MockLoggerRecipient);
        }
Example #7
0
        public void TestAdd()
        {
            BootstrapperFactory bootstrapperFactory = new BootstrapperFactoryImpl();
            LoggerSetter        loggerSetter        = Log4netFactory.NewLoggerSetter();
            LoggerSetterImpl    loggerSetterImpl    = (LoggerSetterImpl)loggerSetter;

            Assert.IsTrue(loggerSetterImpl.LoggerRecipients.Count == 0);
            loggerSetter.Add(MockLoggerRecipient);
            Assert.IsTrue(loggerSetterImpl.LoggerRecipients.Count == 1);
        }