public LoggerSetter NewLoggerSetter() { IList <LoggerRecipient> loggerRecipients = new List <LoggerRecipient>(); LoggerSetterImpl loggerSetter = new LoggerSetterImpl(); loggerSetter.LoggerRecipients = loggerRecipients; return(loggerSetter); }
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); }
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); }