Examples of Identification


Examples of com.crawljax.core.state.Identification

   *             when the input can not be found
   */
  @Test
  public final void testInput() throws CrawljaxException {
    assertFalse("Wrong Xpath so false because of error",
            browser.input(new Identification(How.xpath, "/RUBISH"), "some"));
  }
View Full Code Here

Examples of com.crawljax.core.state.Identification

   * .
   */
  @Test
  public final void testIsVisible() {
    assertFalse("Wrong Xpath so not visible",
            browser.isVisible(new Identification(How.xpath, "/RUBISH")));
  }
View Full Code Here

Examples of com.crawljax.core.state.Identification

   * .
   */
  @Test
  public final void testGetInputWithRandomValue() {
    assertNull("Wrong Xpath so null as result of InputWithRandomValue",
            browser.getInputWithRandomValue(new FormInput("text", new Identification(
                    How.xpath, "/RUBISH"), "abc")));
  }
View Full Code Here

Examples of com.volantis.devrep.device.api.xml.identification.Identification

    private ResourceJiBXTester tester = new ResourceJiBXTester(
            PolicyTestCase.class);

    public void testUnmarshall() throws JiBXException, IOException {
       
        Identification identification =  (Identification) tester.unmarshall(
                Identification.class, "IdentificationTest.xml");

        StringBuffer output = new StringBuffer();
        dumpIdentification(identification, output);
        String actual = output.toString();
View Full Code Here

Examples of com.volantis.devrep.device.api.xml.identification.Identification

    private DeviceIdentificationAnalyserResult testDevicePatterns(
                final String fileName, final String deviceName)
            throws RepositoryException, DeviceRepositoryException {

        // load the identification object
        final Identification identification = loadIdentification(fileName);

        if (identification == null) {
            throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                "device-repository-file-missing",
                DeviceRepositoryConstants.IDENTIFICATION_XML));
        }

        // create the repository
        final SimpleDeviceRepositoryFactory factory =
            new SimpleDeviceRepositoryFactory();
        final DeviceRepository repository =
            factory.createDeviceRepository("file://" + fileName, null);

        final Iterator entriesIter;
        if (deviceName == null) {
            // iterate throuogh the identification entries
            entriesIter = identification.entries();
        } else {
            // only check one entry
            final IdentificationEntry entry = identification.find(deviceName);
            entriesIter = Collections.singleton(entry).iterator();
        }
        return testDevicePatterns(repository, entriesIter);
    }
View Full Code Here

Examples of com.volantis.devrep.device.api.xml.identification.Identification

    public RepositoryEnumeration enumerateDevicePatterns(
            RepositoryConnection connection) throws RepositoryException {

        final Collection devicePatterns = new ArrayList();
        Identification identification = loadIdentification();
        Iterator iterator = identification.entries();
        while (iterator.hasNext()) {
            IdentificationEntry entry = (IdentificationEntry) iterator.next();
            final String deviceName = entry.getDeviceName();
            iterateGenericPatterns(entry, new GenericPatternIteratee() {
                public void next(String pattern) {
View Full Code Here

Examples of com.volantis.devrep.device.api.xml.identification.Identification

            // we had some custom polices, add them too.
            addPolicySetToDevice(customPolicySet, device);
        }

        // Add the device patterns to the device.
        Identification identification = loadIdentification();
        final Map patterns = new HashMap();
        IdentificationEntry idEntry = identification.find(deviceName);
        if (idEntry != null) {
            iterateGenericPatterns(idEntry, new GenericPatternIteratee() {
                public void next(String pattern) {
                    // NOTE: yes this is intentional, why this must be a
                    // map I have no idea - a list would be fine.
View Full Code Here

Examples of org.apache.ace.identification.Identification

        m_service = new DeploymentServiceImpl();
       
        TestUtils.configureObject(m_service, LogService.class);
        TestUtils.configureObject(m_service, EventAdmin.class);
        TestUtils.configureObject(m_service, ConnectionFactory.class, new MockConnectionFactory());
        TestUtils.configureObject(m_service, Identification.class, new Identification() {
            public String getID() {
                return "test";
            }
        });
        TestUtils.configureObject(m_service, Discovery.class, new Discovery() {
View Full Code Here

Examples of org.apache.ace.identification.Identification

        final String value = configuration.get(IDENTIFICATION_PROPERTY_VALUE);
        if (value == null || value.equals("")) {
            throw new ConfigurationException(IDENTIFICATION_PROPERTY_VALUE, "Missing a valid identification value");
        }
        Identification impl = new Identification() {

            @Override
            public String getID() {
                return value;
            }
View Full Code Here

Examples of org.apache.ace.identification.Identification

public class ifconfigBasedIdentificationFactory extends OneComponentFactoryBase {

    @Override
    public Component createComponent(BundleContext context, DependencyManager manager, LogService logService, Map<String, String> configuration) {

        Identification impl = new IfconfigIdentification();
        return manager.createComponent()
            .setInterface(Identification.class.getName(), getAgentproperties(configuration)).setImplementation(impl);
    }
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.