示例#1
0
        public void LogMessages_ShouldBeEmptyAfterConstruction()
        {
            //Arrange
            LoggingSection loggingSection = new LoggingSection(this);

            //Act

            //Assert
            Assert.NotNull(loggingSection.GetLogMessages());
            Assert.True(loggingSection.GetLogMessages().Count == 0);
        }
示例#2
0
        public void LogMessages_ShouldHaveOneEntryAfterLogging()
        {
            //Arrange
            LoggingSection loggingSection = new LoggingSection(this);

            //Act
            loggingSection.Info("Test");

            //Assert
            Assert.NotNull(loggingSection.GetLogMessages());
            Assert.True(loggingSection.GetLogMessages().Count == 1);
        }
示例#3
0
        public void GetLogMessages_ShouldReturnNullAfterDisposal()
        {
            //Arrange
            LoggingSection loggingSection = new LoggingSection(this);

            //Act
            loggingSection.Dispose();

            //Assert
            Assert.Null(loggingSection.GetLogMessages());
        }