/// <summary> /// Runs each test, creating the specified interface from the IAudioClient.GetService method. /// Tests are run in both shared and exclusive mode. /// </summary> /// <param name="onTestReady">The test method to use.</param> protected virtual void ExecuteServiceTest(TestReadyDelegate <T> onTestReady) { Manager = ServiceTestManager <T> .Create(ComIID, false); Manager.OnTestReady = onTestReady; Manager.Run(); Manager = ServiceTestManager <T> .Create(ComIID, true); Manager.OnTestReady = onTestReady; Manager.Run(); }
/// <summary> /// Runs each test, creating the specified interface from the IAudioClient.GetService method. /// Tests are run in both shared and exclusive mode, with the audio client in the running (started) state. /// </summary> /// <param name="onTestReady">The test method to use.</param> protected virtual void ExecuteRunningServiceTest(TestReadyDelegate <T> onTestReady) { var serviceTestManager = ServiceTestManager <T> .Create(ComIID, false); serviceTestManager.AutoStartClient = true; Manager = serviceTestManager; Manager.OnTestReady = onTestReady; Manager.Run(); serviceTestManager = ServiceTestManager <T> .Create(ComIID, true); serviceTestManager.AutoStartClient = true; Manager = serviceTestManager; Manager.OnTestReady = onTestReady; Manager.Run(); }
/// <summary> /// Runs tests via a custom test manager. /// </summary> /// <param name="testManager">The test manager.</param> /// <param name="onTestReady">The test method to use.</param> protected void ExecuteCustomTest(TestManager <T> testManager, TestReadyDelegate <T> onTestReady) { Manager = testManager; Manager.OnTestReady = onTestReady; Manager.Run(); }
/// <summary> /// Runs each test, creating the specified interface from the IAudioClient.GetService method. /// Tests are run only in the specified share mode, with the audio client in the running (started) state. /// </summary> /// <param name="shareMode">The audio client share mode.</param> /// <param name="onTestReady">The test method to use.</param> protected virtual void ExecuteRunningServiceTest(AUDCLNT_SHAREMODE shareMode, TestReadyDelegate <T> onTestReady) { var exclusiveMode = (shareMode == AUDCLNT_SHAREMODE.AUDCLNT_SHAREMODE_EXCLUSIVE); var serviceTestManager = ServiceTestManager <T> .Create(ComIID, exclusiveMode); serviceTestManager.AutoStartClient = true; Manager = serviceTestManager; Manager.OnTestReady = onTestReady; Manager.Run(); }