Package com.volantis.mcs.eclipse.core

Examples of com.volantis.mcs.eclipse.core.ResolvedDevicePolicy


                final PolicyValueModifier modifier =
                        factory.createPolicyValueModifier(shell, SWT.NONE, policyName);
                controller = new PolicyController(policyName, selector,
                        modifier, null, context);

                final ResolvedDevicePolicy rdpOriginal =
                        deviceRAM.resolvePolicy(deviceName, policyName);

                // pixelsx is overridden by Microsoft-WebTV.
                assertEquals("Microsoft-WebTV does not override pixelsx",
                        deviceName, rdpOriginal.deviceName);

                controller.setDeviceName(deviceName);

                // Simulate changing from override to fallback by invoking the private
                // PolicyController#handleFallbackSelection method.
                try {
                    PrivateAccessor.invoke(controller,
                            "handleFallbackSelection", null, null);
                } catch (Throwable throwable) {
                    throw new Exception(throwable);
                }

                // Retrieve the updated policy.
                final ResolvedDevicePolicy rdpFallback =
                        deviceRAM.resolvePolicy(deviceName, policyName);

                // pixelsx was overridden by Microsoft-WebTV but now falls back to TV.
                assertEquals("Microsoft-WebTV does not inherit pixelsx from TV",
                        "TV", rdpFallback.deviceName);

                // Simulate a Restore by invoking the private
                // PolicyController#handleRestoreSelection method.
                try {
                    PrivateAccessor.invoke(controller,
                            "handleRestoreSelection", null, null);
                } catch (Throwable throwable) {
                    throw new Exception(throwable);
                }

                // Retrieve the updated policy.
                final ResolvedDevicePolicy rdpRestore =
                        deviceRAM.resolvePolicy(deviceName, policyName);

                // pixelsx has now been restored and should be overridden by
                // Microsoft-WebTV.
                assertEquals("Microsoft-WebTV does not override pixelsx",
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.core.ResolvedDevicePolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.