Esempio n. 1
0
        public void TestBootstrap()
        {
            BootstrapperFactory bootstrapperFactory = new BootstrapperFactoryImpl();
            LoggerSetter        loggerSetter        = Log4netFactory.NewLoggerSetter();

            loggerSetter.Add(MockLoggerRecipient);
            loggerSetter.Bootstrap();
            Assert.IsNotNull(MockLoggerRecipient);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        public void TestNewLoggerSetter()
        {
            LoggerSetter loggerSetter = Log4netFactory.NewLoggerSetter();

            Assert.IsNotNull(loggerSetter);
            Assert.IsTrue(loggerSetter is LoggerSetterImpl);
            LoggerSetterImpl loggerSetterImpl = (LoggerSetterImpl)loggerSetter;

            Assert.IsNotNull(loggerSetterImpl.LoggerRecipients);
            Assert.IsTrue(loggerSetterImpl.LoggerRecipients.Count == 0);
        }