public void ShouldNotWriteWarningIfErrorVerbosity()
        {
            // Arrange
            const LogType verbosity = LogType.Error;
            const string message = "Test Message";

            // Act
            var logger = new ConsoleLogger(verbosity);
            var loggedMessage = logger.LogWarning(message);

            // Assert
            Assert.AreEqual(null, loggedMessage);
        }
        public void ShouldWriteErrorIfErrorVerbosity()
        {
            // Arrange
            const LogType verbosity = LogType.Error;
            const string message = "Test Message";
            var consoleWrapperMock = new Mock<IConsoleWrapper>(MockBehavior.Strict);

            consoleWrapperMock.Setup(c => c.SetErrorForegroundColor()).Verifiable();
            consoleWrapperMock.Setup(c => c.WriteLine("{0} {1}", new object[] { It.IsAny<string>(), message })).Verifiable();
            consoleWrapperMock.Setup(c => c.ResetColor()).Verifiable();

            // Act
            var logger = new ConsoleLogger(verbosity, consoleWrapperMock.Object);
            var loggedMessage = logger.LogError(message);

            // Assert
            consoleWrapperMock.VerifyAll();
            Assert.AreEqual(message, loggedMessage);
        }
 public void ShouldNotLogIfMessageWhitespace()
 {
     // Act
     var logger = new ConsoleLogger(LogType.Message);
     logger.LogMessage("         "); // Spaces and tabs
 }
 public void ShouldNotLogIfMessageNull()
 {
     // Act
     var logger = new ConsoleLogger(LogType.Message);
     logger.LogMessage(null);
 }
 public void ShouldNotLogIfMessageEmpty()
 {
     // Act
     var logger = new ConsoleLogger(LogType.Message);
     logger.LogMessage(string.Empty);
 }