Examples of PropertyContainer


Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

         return element.getTagName().toUpperCase();
      } else if ("style".equals(propertyName)) {
         return element.getStyle();
      }

      PropertyContainer properties = JsoUtils.getDomProperties(element);

      return properties.getObject(propertyName);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

   }

   @PatchMethod
   static Style getStyle(Element element) {
      // mark the style as being modified
      PropertyContainer properties = JsoUtils.getDomProperties(element);
      properties.put("style", "");

      return GwtStyleUtils.getStyle(element);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      return JavaScriptObjects.getDouble(element, SCROLL_TOP);
   }

   @PatchMethod
   static void removeAttribute(Element element, String name) {
      PropertyContainer properties = JsoUtils.getDomProperties(element);
      String propertyName = DOMImplPatcher.getDOMPropertyName(name);
      properties.remove(propertyName);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

   static void setAttribute(Element element, String attributeName, String value) {
      if (JsoProperties.ID.equals(attributeName)) {
         JsoUtils.onSetId(element, value, getPropertyString(element, JsoProperties.ID));
      }

      PropertyContainer properties = JsoUtils.getDomProperties(element);

      String propertyName = DOMImplPatcher.getDOMPropertyName(attributeName);

      properties.put(propertyName, value);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      if (JsoProperties.ID.equals(name)) {
         JsoUtils.onSetId(element, value.toString(), getPropertyString(element, JsoProperties.ID));
      }

      PropertyContainer properties = JsoUtils.getDomProperties(element);

      if ("style".equals(value)) {
         GwtStyleUtils.overrideStyle(element.getStyle(), value.toString());
         // add an empty style to preserve the insert order of DOM attribute in
         // the
         // wrapped LinkedHashMap
         properties.put(name, "");
      } else {
         properties.put(name, value);
      }
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

   }

   @PatchMethod
   static String getAttribute(JavaScriptObject o, String name) {
      // Attribute return by XML node can be null
      PropertyContainer properties = JsoUtils.getDomProperties(o.<Element> cast());

      // special treatement for 'class' attribute, which is automatically stored
      // in the PropertyContainer with 'className' key

      if ("class".equals(name)) {
         name = "className";
      }
      return properties.getObject(name);
   }
View Full Code Here

Examples of com.googlecode.gwt.test.internal.utils.PropertyContainer

      return node.removeChild(oldChildNode);
   }

   @PatchMethod
   static void setAttribute(JavaScriptObject o, String name, String value) {
      PropertyContainer properties = JsoUtils.getDomProperties(o.<Element> cast());
      properties.put(name, value);
   }
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.PropertyContainer

     * Test that the populateWebDriverResponse adds headers and cookies
     * correctly added to the WebDriverResponse.
     */
    public void testAddHeadersToWebDriverResponse() throws Throwable {
        PluggableHTTPManager manager = createTestablePluggableHTTPManager();
        PropertyContainer container = new RecoverableComplexPropertyContainer();

        WebDriverRequest request = new WebDriverRequestImpl();
        WebDriverResponseImpl response = new WebDriverResponseImpl();
        WebDriverAccessor accessor = createWebDriverAccessor(request, response);
        container.setProperty(WebDriverAccessor.class, accessor, false);

        String cookieName = "Set-Cookie";
        String cookieValue = "name1=value1";
        CookieVersion cookieVersion = CookieVersion.RFC2109;

View Full Code Here

Examples of com.volantis.xml.pipeline.sax.PropertyContainer

     */
    public void testAddHeadersToWebDriverResponseWithAdditionalHeaders()
                throws Throwable {

        PluggableHTTPManager manager = createTestablePluggableHTTPManager();
        PropertyContainer container = new RecoverableComplexPropertyContainer();

        WebDriverRequest request = new WebDriverRequestImpl();
        WebDriverResponseImpl response = new WebDriverResponseImpl();
        WebDriverAccessor accessor = createWebDriverAccessor(request, response);
        container.setProperty(WebDriverAccessor.class, accessor, false);

        String cookieName = "Set-Cookie";
        String cookieValue = "name1=value1";
        final Cookie cookie1 = new CookieImpl(cookieName, "localhost", "/");
        cookie1.setValue(cookieValue);
View Full Code Here

Examples of org.neo4j.graphdb.PropertyContainer

  protected void assertExpectedMapping(String alias, String cypher, Map<String, Object> params) throws Exception {
    getTransactionManager().begin();
    ResourceIterator<Object> columnAs = executeCypherQuery( "MATCH " + cypher + " RETURN " + alias, params ).columnAs( alias );

    assertThat( columnAs.hasNext() ).as( cypher + " not found, cannot count properties" ).isTrue();
    PropertyContainer propertyContainer = (PropertyContainer) columnAs.next();
    Iterable<String> propertyKeys = propertyContainer.getPropertyKeys();
    List<String> unexpectedProperties = new ArrayList<String>();
    Set<String> expectedProperties = null;
    @SuppressWarnings("unchecked")
    Map<String, Object> expectedPropertiesMap = (Map<String, Object>) params.get( alias );
    if (expectedPropertiesMap != null) {
      expectedProperties = expectedPropertiesMap.keySet();
    }
    for ( Iterator<String> iterator = propertyKeys.iterator(); iterator.hasNext(); ) {
      String actual = iterator.next();
      if ( !expectedProperties.contains( actual ) ) {
        unexpectedProperties.add( actual );
      }
    }
    List<String> missingProperties = new ArrayList<String>();
    if ( expectedProperties != null ) {
      for ( String expected : expectedProperties ) {
        if ( !propertyContainer.hasProperty( expected ) ) {
          missingProperties.add( expected );
        }
      }
    }
    assertThat( unexpectedProperties ).as( "Unexpected properties for " + cypher ).isEmpty();
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.