public void SecuritySymmetricEncryptionEventTest() { string eventName = "SecurityCryptoSymmetricEncryptionEvent"; WmiEventDelegate action = new WmiEventDelegate(FireSecuritySymmetricEncryptionEvent); base.FireMessageToWMI(eventName, action, defaultExpected); }
public void SecurityProfileLoadEventTest() { string eventName = "SecurityProfileLoadEvent"; WmiEventDelegate action = new WmiEventDelegate(FireSecurityProfileLoadEvent); base.FireMessageToWMI(eventName, action, defaultExpected); }
public void SecurityCryptoHashFailureEventTest() { string eventName = "SecurityCryptoHashCheckFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireSecurityCryptoHashFailureEvent); base.FireMessageToWMI(eventName, action, defaultExpected); }
public void SecurityAuthenticationCheckEventTest() { string eventName = "SecurityAuthenticationCheckEvent"; WmiEventDelegate action = new WmiEventDelegate(FireSecurityAuthenticationCheckEvent); base.FireMessageToWMI(eventName, action, defaultExpected); }
public void SecurityAuthorizationFailedEventTest() { string eventName = "SecurityAuthorizationFailedEvent"; WmiEventDelegate action = new WmiEventDelegate(FireSecurityAuthorizationFailedEvent); base.FireMessageToWMI(eventName, action, "Message = \"" + testMessage + ":" + "action" + "\""); }
public void LoggingServiceFailureEventTest() { string eventName = "LoggingServiceFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireLoggingServiceFailureEvent); base.FireMessageToWMI(eventName, action, defaultExpected); }
public void SecuritySymmetricDecryptionEventTest() { string eventName = "SecurityCryptoSymmetricDecryptionEvent"; WmiEventDelegate action = new WmiEventDelegate(FireSecuritySymmetricDecryptionEvent); base.FireMessageToWMI(eventName, action, defaultExpected); }
public void ConfigFailureTest() { string eventName = "ExceptionHandlingConfigFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireExceptionHandlingConfigFailureEvent); string expected = "Message = \"\""; base.FireMessageToWMI(eventName, action, expected); }
public void CachingServiceInternalFailureEventTestWithException() { string eventName = "CachingServiceInternalFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireCachingServiceInternalFailureEventWithException); string expected = "ExceptionMessage = \"System.Exception: test exception\";\n\tExceptionStackTrace = NULL;\n\tMessage = \"test\""; base.FireMessageToWMI(eventName, action, expected); }
public void CachingServiceCacheScavengedEventTest() { string eventName = "CachingServiceCacheScavengedEvent"; WmiEventDelegate action = new WmiEventDelegate(FireCachingServiceCacheScavengedEvent); string expected = "ConfiguredSizeLimit = \"1\";\n\tMessage = \"\";\n\tNumberOfItemRemoved = \"1\";\n\tScavengingRange = 1;\n\t"; base.FireMessageToWMI(eventName, action, expected); }
public void CachingServiceInternalFailureEventTest() { string eventName = "CachingServiceInternalFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireCachingServiceInternalFailureEvent); string expected = "Message = \"test\""; base.FireMessageToWMI(eventName, action, expected); }
public void DataServiceFailureEventTest() { string eventName = "DataServiceFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireDataServiceFailureEvent); string expected = "ExceptionMessage = \"System.Exception: test\";\n\tExceptionStackTrace = NULL;"; base.FireMessageToWMI(eventName, action, expected); }
public void CachingServiceCacheFlushedEventTest() { string eventName = "CachingServiceCacheFlushedEvent"; WmiEventDelegate action = new WmiEventDelegate(FireCachingServiceCacheFlushedEvent); string expected = "Message = \"\""; base.FireMessageToWMI(eventName, action, expected); }
public void DataConnectionOpenedEventTest() { string eventName = "DataConnectionOpenedEvent"; WmiEventDelegate action = new WmiEventDelegate(FireDataConnectionOpenedEvent); string expected = "Message = \"Data Connection opened: test connection\""; base.FireMessageToWMI(eventName, action, expected); }
public void DataServiceConfigFailureEventTest() { string eventName = "DataServiceConfigFailureEvent"; WmiEventDelegate action = new WmiEventDelegate(FireDataServiceConfigFailureEvent); string expected = "ExceptionMessage = \"System.Exception: test\";\n\tExceptionStackTrace = NULL;\n\tFailedConfigurationFile = \"ConnectionSettings.config\";\n\tMessage = \"test\""; base.FireMessageToWMI(eventName, action, expected); }
public void DataConnectionFailedEventTest() { string eventName = "DataConnectionFailedEvent"; WmiEventDelegate action = new WmiEventDelegate(FireDataConnectionFailedEvent); string expected = "Message = \"Data connection failed to open: test connection\""; base.FireMessageToWMI(eventName, action, expected); }
public void DataTransactionRolledBackEventTest() { string eventName = "DataTransactionRolledBackEvent"; WmiEventDelegate action = new WmiEventDelegate(FireDataTransactionRolledBackEvent); string expected = "Message = \"Connection: test connection\""; base.FireMessageToWMI(eventName, action, expected); }
public void FireMessageToWMI(string eventName, WmiEventDelegate action, string expected) { ManagementScope scope = new ManagementScope(@"\\." + WmiPath); scope.Options.EnablePrivileges = true; EventQuery eq = new EventQuery("SELECT * FROM " + eventName); using (ManagementEventWatcher watcher = new ManagementEventWatcher(scope, eq)) { watcher.EventArrived += new EventArrivedEventHandler(WatcherEventArrived); watcher.Start(); action(); WaiUntilWMIEventArrives(); watcher.Stop(); } Assert.IsTrue(this.wmiLogged); Assert.IsTrue(this.wmiResult.IndexOf(expected) > -1); }