Examples of DeviceRepositoryFactory


Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();

                {
                    DeviceRepository repository = factory.getDeviceRepository(
                            deviceRepositoryUrl, null);

                    List list = repository.getDevicePolicyNames();
                    assertNotNull("Valid list should be found", list);
                    assertEquals("Expected 262 policy names", 262, list.size());
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();

                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                List list = repository.getPolicyCategoryNames();
                assertEquals(17, list.size());
                assertTrue(list.contains("system"));
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();

                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                String deviceName = repository.getFallbackDeviceName("Master");
                assertNull(deviceName);
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();

                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                List children = repository.getChildrenDeviceNames(("Master"));
                assertEquals(6, children.size());
                assertTrue(children.contains("Voice"));
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

        TemporaryFileManager manager = new TemporaryFileManager(
                new TestDeviceRepositoryCreator());
        manager.executeWith(new TemporaryFileExecutor() {
            public void execute(File file) throws Exception {
                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();

                {
                    DeviceRepository repository = factory.getDeviceRepository(
                            deviceRepositoryUrl, null);

                    List list = repository.getDevicePolicyNamesByCategory(null);
                    assertNull("No policy names should not be found", list);
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();
                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                PolicyDescriptor descriptor =
                        repository.getPolicyDescriptor(null, Locale.getDefault());
                assertNull("Policy descriptor should not be found", descriptor);
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();
                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                CategoryDescriptor descriptor =
                    repository.getCategoryDescriptor(null, Locale.getDefault());
                assertNull("Category descriptor should not be found", descriptor);
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();
                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                // Test match pattern*
                String pattern = "Nokia-3*";
                List actual = repository.getDevices(pattern);
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

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

                DeviceRepositoryFactory factory =
                            DeviceRepositoryFactory.getDefaultInstance();
                URL deviceRepositoryUrl = file.toURL();
                DeviceRepository repository = factory.getDeviceRepository(
                        deviceRepositoryUrl, null);

                String deviceName = "Master";

                Device device = repository.getDevice(deviceName);
View Full Code Here

Examples of com.volantis.mcs.devices.DeviceRepositoryFactory

     * Ensure that the latest device repository has duplicate secondary
     * header ID regular expressions for each one starting with X-WAP-PROFILE.
     */
    // SEE NOTE ABOVE AS TO WHY THIS WAS DISABLED.
    public void NOtestLatestDeviceRepository() throws Exception {
        DeviceRepositoryFactory factory =
                DeviceRepositoryFactory.getDefaultInstance();

        // NOTE: THIS IS VERY SLOW AS THE LATEST DEVICES FILE IS HUGE.
        // IT HAS BEEN DELETED FOR THE MOMENT. IF YOU WANT TO TEST THIS YOU
        // NEED TO ADD YOUR OWN MANUALLY.
        File deviceRepositoryFile = extractTempZipFromJarFile(
                DevicePatternTestCase.class,
                "latest-devices.mdpr",
                DeviceRepositoryConstants.REPOSITORY_EXTENSION);

        URL deviceRepositoryUrl = deviceRepositoryFile.toURL();

        DeviceRepository deviceRepository =
                factory.getDeviceRepository(deviceRepositoryUrl, null);

        List devicesWithXWAPProfileSecondaryIDs = new ArrayList();
        devicesWithXWAPProfileSecondaryIDs.add("Palm-Blazer");
        devicesWithXWAPProfileSecondaryIDs.add("Blazer-3_0");
        devicesWithXWAPProfileSecondaryIDs.add("XHTML-Handset");
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.