Examples of DeviceRepositoryAccessorManager


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

        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                // Create the manager from the repository file, giving it an
                // ODOMFactory,
                DeviceRepositoryAccessorManager deviceRAM =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DeviceODOMElementFactory(), false);

                final Shell shell = new Shell(Display.getDefault(), SWT.SHELL_TRIM);
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager deviceRAM =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                JDOM_FACTORY, false);

                // Iterate over the policy types.
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                String rootDeviceName = manager.retrieveRootDeviceName();
                assertEquals("The root device name is not Master.", "Master",
                        rootDeviceName);
            }
        });
    }
View Full Code Here

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

    public void testRemoveDevice() throws Exception {
        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {
                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);
                final String deviceName = "MyTestDevice";

                assertFalse("Test device already exists!",
                            manager.deviceExists(deviceName));

                manager.createDevice("Master", deviceName);

                assertNotNull("Device identification element is null!",
                              manager.retrieveDeviceIdentification(deviceName));

                manager.removeDevice(deviceName);

                try {
                    manager.retrieveDeviceIdentification(deviceName);

                    fail("Expected an illegal argument exception when " +
                         "looking for ID element for non-existent device");
                } catch (IllegalArgumentException e) {
                    // Expected condition
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                assertTrue("Expected the \"PC\" device to exist.",
                        manager.deviceExists("PC"));
                assertFalse("Expected the \"FantasicAmazingDevice\" device to not exist.",
                        manager.deviceExists("FantasticAmazingDevice"));
            }
        });
    }
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                assertEquals("Unexpected device repository name.",
                        repository.getPath(), manager.getDeviceRepositoryName());
            }
        });
    }
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                try {
                    manager.getLocalizedPolicyName(null);
                    fail("Expected an IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    // expected
                }
            }
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                try {
                    manager.getLocalizedPolicyName("");
                    fail("Expected an IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    // expected
                }
            }
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                String localized = manager.getLocalizedPolicyName("beep");
                assertEquals("Unexpected localized policy name.", "Beep",
                        localized);
            }
        });
    }
View Full Code Here

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

        TemporaryFileManager tempFileMgr = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        tempFileMgr.executeWith(new TemporaryFileExecutor() {
            public void execute(File repository) throws Exception {

                DeviceRepositoryAccessorManager manager =
                        new DeviceRepositoryAccessorManager(
                                repository.getPath(),
                                new TestTransformerMetaFactory(),
                                new DefaultJDOMFactory(), false);

                try {
                    manager.setLocalizedPolicyName(null, "localName");
                    fail("Expected an IllegalArgumentException");
                } catch (IllegalArgumentException e) {
                    // expected
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.