예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
            }
        }