Example #1
0
        public void PassNullToFileAppenderFileProperty_ThrowException()
        {
            var mockedLayout = new Mock<ILayout>().Object;

            var fileAppender = new FileAppender(mockedLayout);
            fileAppender.File = null;
        }
Example #2
0
        public void PassNullMessageTypeToFileAppenderFileProperty_ThrowException()
        {
            var mockedLayout = new Mock<ILayout>().Object;

            var fileAppender = new FileAppender(mockedLayout);
            fileAppender.File = "fghgfhgfh";
        }
Example #3
0
        public void PassInvalidFileDestinationToFileAppenderFileProperty_ThrowException()
        {
            var mockedLayout = new Mock<ILayout>().Object;

            var fileAppender = new FileAppender(mockedLayout);
            fileAppender.File = "fghgfhgfh";
        }
Example #4
0
        public void PassNullParameterToFileAppenderAppend_ThrowException()
        {
            var mockedLayout = new Mock<ILayout>().Object;

            var dateTimeWhenMessageOccured = DateTime.Now;
            var messageType = ReportLevel.Info;

            var appender = new FileAppender(mockedLayout);
            appender.Append(dateTimeWhenMessageOccured, messageType, null);
        }