public void Log_InitializedProvider_Succeeds()
        {
            // Arrange
            var provider = new TerminatorLoggingProvider();

            provider.Initialize("Valid name", CreateValidConfiguration());

            // Act
            provider.Log("Some message");
        }
        public void Log_WithValidLogEntry_ReturnsNull()
        {
            // Arrange
            ILogger provider = new TerminatorLoggingProvider();
            var     entry    = new LogEntry(LoggingEventType.Error, "error", null, null);

            // Act
            object id = provider.Log(entry);

            // Assert
            Assert.IsNull(id, "Provider should always return null.");
        }
        public void Log_ProviderInitializedWithDefaultConstructor_LogsSuccesfully()
        {
            // Arrange
            string expectedMessage = "Some message";

            var provider = new TerminatorLoggingProvider();

            // Act
            // In contrast with most other providers, this provider should succeed in logging the event when
            // it was created with the default constructor, and not initialized with Initialize(string, NVC).
            // This behavior is different, because the the only initialization argument the provider needs is
            // the severity, which will be retain its default value of 'Debug' when not set.
            provider.Log(LoggingEventType.Debug, expectedMessage);
        }