Package org.apache.wookie.connector.framework

Examples of org.apache.wookie.connector.framework.Widget


  public void widgetHandling ( ) throws WookieConnectorException, IOException {
    File widgetFile = new File ( "connector/java/src-test/org/apache/wookie/tests/connector/framework/impl/empty.wgt" );
    String adminUsername = "java";
    String adminPassword = "java";
    File saveWidgetFile = File.createTempFile("empty"+Long.toString(System.nanoTime()), "wgt");
    Widget uploadedWidget = service.postWidget(widgetFile, adminUsername, adminPassword);
    assertNotNull ( "Widget value from postWidget is null", uploadedWidget);
    String identifier = uploadedWidget.getIdentifier();
   
    uploadedWidget = service.updateWidget(widgetFile, identifier, adminUsername, adminPassword);
    uploadedWidget = service.getWidget(identifier);
    assertNotNull("Widget value from getWidget is null", uploadedWidget);
   
View Full Code Here


  @Test
  public void upload() throws WookieConnectorException{
    File widgetFile = new File ( "connector/java/src-test/org/apache/wookie/tests/connector/framework/impl/localetest.wgt" );
    String adminUsername = "java";
    String adminPassword = "java";
    Widget uploadedWidget = service.postWidget(widgetFile, adminUsername, adminPassword);
    assertNotNull ( "Widget value from postWidget is null", uploadedWidget);
    String identifier = uploadedWidget.getIdentifier();
    assertEquals("http://www.getwookie.org/widgets/localetest", identifier);
    assertEquals("255", uploadedWidget.getWidth());
    assertEquals("383", uploadedWidget.getHeight());
  }
View Full Code Here

  }
 
 
  @Test
  public void getWidgetMetadata() throws WookieConnectorException{
    Widget widget = service.getAvailableWidgets().get("http://notsupported");
    assertEquals("Unsupported widget widget", widget.getName());
    assertEquals("This widget is a placeholder for when no corresponding widget is found for a given type", widget.getDescription());
    assertEquals("500", widget.getWidth());
    assertEquals("358", widget.getHeight());
    assertEquals("Paul Sharples", widget.getAuthor());
    assertEquals("http://notsupported", widget.getIdentifier());
  }
View Full Code Here

    assertEquals("http://notsupported", widget.getIdentifier());
  }

  @Test
  public void getWidgetMetadata2() throws WookieConnectorException{
    Widget widget = service.getAvailableWidgets().get("http://wookie.apache.org/widgets/simplechat");
    assertEquals("SimpleChat", widget.getName());
    assertEquals("Stripped down chat widget with minimal styling", widget.getDescription());
    assertEquals("255", widget.getWidth());
    assertEquals("383", widget.getHeight());
    assertEquals("Apache Wookie (Incubating) Team", widget.getAuthor());
    assertEquals("http://localhost:8080/wookie/deploy/wookie.apache.org/widgets/simplechat/icon.png", widget.getIcon().toString());
    assertEquals("http://wookie.apache.org/widgets/simplechat", widget.getIdentifier());
    assertEquals("Licensed under the Apache 2.0 License (see http://www.apache.org/licenses/LICENSE-2.0). Smileys created by macpoupou and licensed under Creative Commons Attribution License 3.0. See http://ismileys.free.fr/smileys/ for more information.", widget.getLicense());
  }
View Full Code Here

  public void widgetHandling ( ) throws WookieConnectorException, IOException {
    File widgetFile = new File ( "connector/java/src-test/org/apache/wookie/tests/connector/framework/impl/empty.wgt" );
    String adminUsername = "java";
    String adminPassword = "java";
    File saveWidgetFile = File.createTempFile("empty"+Long.toString(System.nanoTime()), "wgt");
    Widget uploadedWidget = service.postWidget(widgetFile, adminUsername, adminPassword);
    assertNotNull ( "Widget value from postWidget is null", uploadedWidget);
    String identifier = uploadedWidget.getIdentifier();
   
    uploadedWidget = service.updateWidget(widgetFile, identifier, adminUsername, adminPassword);
    uploadedWidget = service.getWidget(identifier);
    assertNotNull("Widget value from getWidget is null", uploadedWidget);
   
View Full Code Here

 
 
 
  @Test
  public void getWidgetMetadata() throws WookieConnectorException{
    Widget widget = service.getAvailableWidgets().get("http://notsupported");
    assertEquals("Unsupported widget widget", widget.getName());
    assertEquals("This widget is a placeholder for when no corresponding widget is found for a given type", widget.getDescription());
    assertEquals("500", widget.getWidth());
    assertEquals("358", widget.getHeight());
    assertEquals("Paul Sharples", widget.getAuthor());
    assertEquals("http://notsupported", widget.getIdentifier());
  }
View Full Code Here

    assertEquals("http://notsupported", widget.getIdentifier());
  }

  @Test
  public void getWidgetMetadata2() throws WookieConnectorException{
    Widget widget = service.getAvailableWidgets().get("http://wookie.apache.org/widgets/simplechat");
    assertEquals("SimpleChat", widget.getName());
    assertEquals("Stripped down chat widget with minimal styling", widget.getDescription());
    assertEquals("255", widget.getWidth());
    assertEquals("383", widget.getHeight());
    assertEquals("Apache Wookie (Incubating) Team", widget.getAuthor());
    assertEquals("http://localhost:8080/wookie/deploy/wookie.apache.org/widgets/simplechat/icon.png", widget.getIcon().toString());
    assertEquals("http://wookie.apache.org/widgets/simplechat", widget.getIdentifier());
    assertEquals("Licensed under the Apache 2.0 License (see http://www.apache.org/licenses/LICENSE-2.0). Smileys created by macpoupou and licensed under Creative Commons Attribution License 3.0. See http://ismileys.free.fr/smileys/ for more information.", widget.getLicense());
  }
View Full Code Here

  public void widgetHandling ( ) throws WookieConnectorException, IOException {
    File widgetFile = new File ( "connector/java/src/test/java/org/apache/wookie/tests/connector/framework/impl/empty.wgt" );
    String adminUsername = "java";
    String adminPassword = "java";
    File saveWidgetFile = File.createTempFile("empty"+Long.toString(System.nanoTime()), "wgt");
    Widget uploadedWidget = service.postWidget(widgetFile, adminUsername, adminPassword);
    assertNotNull ( "Widget value from postWidget is null", uploadedWidget);
    String identifier = uploadedWidget.getIdentifier();
   
    uploadedWidget = service.updateWidget(widgetFile, identifier, adminUsername, adminPassword);
    uploadedWidget = service.getWidget(identifier);
    assertNotNull("Widget value from getWidget is null", uploadedWidget);
   
View Full Code Here

  @Test
  public void upload() throws WookieConnectorException{
    File widgetFile = new File ( "connector/java/src/test/java/org/apache/wookie/tests/connector/framework/impl/localetest.wgt" );
    String adminUsername = "java";
    String adminPassword = "java";
    Widget uploadedWidget = service.postWidget(widgetFile, adminUsername, adminPassword);
    assertNotNull ( "Widget value from postWidget is null", uploadedWidget);
    String identifier = uploadedWidget.getIdentifier();
    assertEquals("http://www.getwookie.org/widgets/localetest", identifier);
    assertEquals("255", uploadedWidget.getWidth());
    assertEquals("383", uploadedWidget.getHeight());
  }
View Full Code Here

  }
 
 
  @Test
  public void getWidgetMetadata() throws WookieConnectorException{
    Widget widget = service.getAvailableWidgets().get("http://notsupported");
    assertEquals("Unsupported widget widget", widget.getName());
    assertEquals("This widget is a placeholder for when no corresponding widget is found for a given type", widget.getDescription());
    assertEquals("500", widget.getWidth());
    assertEquals("358", widget.getHeight());
    assertEquals("Paul Sharples", widget.getAuthor());
    assertEquals("http://notsupported", widget.getIdentifier());
  }
View Full Code Here

TOP

Related Classes of org.apache.wookie.connector.framework.Widget

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.