예제 #1
0
        public LoggerSetter NewLoggerSetter()
        {
            IList <LoggerRecipient> loggerRecipients = new List <LoggerRecipient>();
            LoggerSetterImpl        loggerSetter     = new LoggerSetterImpl();

            loggerSetter.LoggerRecipients = loggerRecipients;
            return(loggerSetter);
        }
예제 #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);
        }
예제 #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);
        }