public void Log_InitializedProvider_Succeeds() { // Arrange var provider = new FakeWindowsEventLogLoggingProvider(); provider.Initialize("Valid name", CreateValidConfiguration()); // Act provider.Log("Some message"); }
public void Log_WithLoggingEventTypeDebug_LogsEventWithoutEventLogEntryType() { // Arrange var loggedLoggingEventType = LoggingEventType.Debug; FakeWindowsEventLogLoggingProvider provider = BuildInitializedProvider(); // Act provider.Log(loggedLoggingEventType, "Valid message"); // Assert Assert.AreEqual(null, provider.LoggedType); }
public void Log_WithLoggingEventTypeInformation_LogsEventLogEntryTypeInformation() { // Arrange var loggedLoggingEventType = LoggingEventType.Information; var expectedWindowsLogType = EventLogEntryType.Information; FakeWindowsEventLogLoggingProvider provider = BuildInitializedProvider(); // Act provider.Log(loggedLoggingEventType, "Valid message"); // Assert Assert.AreEqual(expectedWindowsLogType, provider.LoggedType); }