Package com.volantis.mcs.repository

Examples of com.volantis.mcs.repository.RepositoryEnumeration


                AbstractDeviceRepositoryAccessor accessor =
                        createAccessor(deviceRepositoryFile);

                Set expectedDeviceNames = new HashSet();
                Set actualDeviceNames = new HashSet();
                RepositoryEnumeration nameEnum =
                    accessor.enumerateDeviceNames(createConnection());

                String[] deviceNames = getExpectedDeviceNames();

                for (int i = 0; i < deviceNames.length; i++) {
                    expectedDeviceNames.add(deviceNames[i]);
                }

                while (nameEnum.hasNext()) {
                    actualDeviceNames.add(nameEnum.next());
                }

                assertEquals("device names not as",
                             expectedDeviceNames,
                             actualDeviceNames);
View Full Code Here


                        createAccessor(deviceRepositoryFile);

                Map expectedFallbacks = getExpectedDeviceFallbacks();
                Map actualFallbacks = new HashMap();

                RepositoryEnumeration fallbackEnum =
                    accessor.enumerateDeviceFallbacks(createConnection());

                while (fallbackEnum.hasNext()) {
                    String[] fallback = (String[])fallbackEnum.next();

                    actualFallbacks.put(fallback[0], fallback[1]);
                }

                assertEquals("device fallbacks not as",
View Full Code Here

                if (deviceName == null) {
                    throw new IllegalArgumentException("test case fault");
                }

                RepositoryEnumeration childrenEnum =
                    accessor.enumerateDevicesChildren(createConnection(),
                            deviceName);

                while (i.hasNext()) {
                    String name = (String)i.next();
                    String fallback = (String)fallbacks.get(name);

                    if (deviceName.equals(fallback)) {
                        expectedChildren.add(name);
                    }
                }

                while (childrenEnum.hasNext()) {
                    actualChildren.add(childrenEnum.next());
                }

                assertEquals(deviceName + " children not as",
                             expectedChildren,
                             actualChildren);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.repository.RepositoryEnumeration

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.