private void ExecuteTest( Action <ITestDriversProxy, IPendingDriverChangesRegister, ITestDriversSource> test ) { var pendingChanges = new TestDefaultPendingDriverChangesRegister(); var driversSource = new TestDriversSource(); var proxy = new TestDriversProxy(pendingChanges, driversSource); try { test(proxy, pendingChanges, driversSource); } finally { pendingChanges.Dispose(); driversSource.Dispose(); } }
public void CanGetTestDriverStatus() { var pendingChanges = new TestDefaultPendingDriverChangesRegister(); var driversSource = new TestDriversSource(); try { var dp = new TestDriversProxy(pendingChanges, driversSource); { var mn = new DriverModuleName("ACPI"); Assert.IsTrue(dp.Query.IsActivated(mn)); Assert.IsFalse(dp.Query.IsActivationPending(mn)); Assert.IsFalse(dp.Query.IsDeactivationPending(mn)); } } finally { pendingChanges.Dispose(); driversSource.Dispose(); } }