public void DeleteEventsource_WithEventSourceThatDoesNotExist_ThrowsEventSourceNotFoundException() { // Arrange var eventLogCommands = new EventLogCommand(); string eventSourceThatDoesNotExist = "AnyEventSourceThatDoesNotExist"; // Assert Assert.Throws <EventSourceNotFoundException>( // Act delegate { eventLogCommands.DeleteEventSource(eventSourceThatDoesNotExist); }); }
public void GetEventLogSources_WithEventLogThatDoesNotExist_ThrowsEventLogNotFoundException() { // Arrange var eventLogCommands = new EventLogCommand(); string eventLogThatDoesNotExist = "EventLogThatDoesNotExist"; // Assert Assert.Throws <EventLogNotFoundException>( // Act delegate { eventLogCommands.GetEventLogSources(eventLogThatDoesNotExist); }); }
public void CreateEventSource_WithEventLogThatDoesNotExist_ThrowsEventLogNotFoundException() { // Arrange var eventLogCommands = new EventLogCommand(); string eventLogThatDoesNotExist = "EventLogThatDoesNotExist"; string newEventSourceName = "NewEventSourceName"; // Assert Assert.Throws <EventLogNotFoundException>( // Act delegate { eventLogCommands.CreateEventSource(newEventSourceName, eventLogThatDoesNotExist); }); }
protected override void InitializeView(IClientController clientController, ICrossViewManager crossViewManager) { _command = clientController.Commander.GetCommand <EventLogCommand>(); _command.EventLogReceived += CommandOnEventLogReceived; }