Package com.eclipsesource.tabris.ui

Examples of com.eclipsesource.tabris.ui.UIConfiguration


    TestAction action = ( TestAction )actionDescriptor.getAction();
    verify( listener ).executed( ui, action );
  }

  private void mockUI( ActionListener listener ) {
    UIConfiguration configuration = new UIConfiguration();
    configuration.addActionListener( listener );
    when( ui.getConfiguration() ).thenReturn( configuration );
  }
View Full Code Here


    doReturn( Boolean.FALSE ).when( descriptor ).isVisible();
    return descriptor;
  }

  private void mockUI( SearchActionListener listener ) {
    UIConfiguration configuration = new UIConfiguration();
    configuration.addActionListener( listener );
    when( ui.getConfiguration() ).thenReturn( configuration );
  }
View Full Code Here

    verify( listener ).executed( ui, action );
  }

  private void mockUI( ActionListener listener ) {
    UIConfiguration configuration = new UIConfiguration();
    configuration.addActionListener( listener );
    when( ui.getConfiguration() ).thenReturn( configuration );
  }
View Full Code Here

    verify( remoteObject ).set( "message", "foo" );
  }

  private void mockUI( SearchActionListener listener ) {
    UIConfiguration configuration = new UIConfiguration();
    configuration.addActionListener( listener );
    when( ui.getConfiguration() ).thenReturn( configuration );
  }
View Full Code Here

  @Test
  public void testNotifiesUpdaterAboutUIChange() {
    UIUpdater updater = mock( UIUpdater.class );
    UpdateUtil.registerUpdater( updater );
    UIConfiguration configuration = mock( UIConfiguration.class );

    UpdateUtil.fireUiUpdate( configuration );

    verify( updater ).update( configuration );
  }
View Full Code Here

  }

  @Test( expected = IllegalStateException.class )
  public void testFailsClosingTopLevelPage() {
    Controller controller = mock( Controller.class );
    UIConfiguration configuration = mock( UIConfiguration.class );
    UIDescriptor contentHolder = new UIDescriptor();
    PageDescriptor page = mock( PageDescriptor.class );
    when( page.getId() ).thenReturn( "foo" );
    doReturn( Boolean.TRUE ).when( page ).isTopLevel();
    contentHolder.add( page );
    when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( contentHolder );
    UIImpl ui = new UIImpl( display, controller, configuration );
    ui.markInitialized();
    ui.getPageOperator().openPage( "foo" );

    ui.getPageOperator().closeCurrentPage();
View Full Code Here

    ui.getPageOperator().closeCurrentPage();
  }

  @Test( expected = IllegalStateException.class )
    public void testOpenPageFailsWithNonExistingPage() {
      UIConfiguration configuration = mock( UIConfiguration.class );
      when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( mock( UIDescriptor.class ) );
      UIImpl ui = new UIImpl( display, controller, configuration );
      ui.markInitialized();

      ui.getPageOperator().openPage( "foo" );
    }
View Full Code Here

    }

  @Test
  public void testShowsRootPageWithController() {
    Controller controller = mock( Controller.class );
    UIConfiguration configuration = mock( UIConfiguration.class );
    UIDescriptor contentHolder = new UIDescriptor();
    PageDescriptor page = mock( PageDescriptor.class );
    when( page.getId() ).thenReturn( "foo" );
    doReturn( Boolean.TRUE ).when( page ).isTopLevel();
    contentHolder.add( page );
    when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( contentHolder );
    UIImpl ui = new UIImpl( display, controller, configuration );

    ui.markInitialized();
    ui.getPageOperator().openPage( "foo" );
View Full Code Here

  }

  @Test( expected = IllegalArgumentException.class )
  public void testShowsRootPageFailsWithNullPageData() {
    Controller controller = mock( Controller.class );
    UIConfiguration configuration = mock( UIConfiguration.class );
    UIDescriptor contentHolder = new UIDescriptor();
    PageDescriptor page = mock( PageDescriptor.class );
    when( page.getId() ).thenReturn( "foo" );
    doReturn( Boolean.TRUE ).when( page ).isTopLevel();
    contentHolder.add( page );
    when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( contentHolder );
    UIImpl ui = new UIImpl( display, controller, configuration );
    ui.markInitialized();

    ui.getPageOperator().openPage( "foo", null );
  }
View Full Code Here

  }

  @Test
  public void testShowsRootPageWithControllerAndPageData() {
    Controller controller = mock( Controller.class );
    UIConfiguration configuration = mock( UIConfiguration.class );
    UIDescriptor contentHolder = new UIDescriptor();
    PageDescriptor page = mock( PageDescriptor.class );
    when( page.getId() ).thenReturn( "foo" );
    doReturn( Boolean.TRUE ).when( page ).isTopLevel();
    contentHolder.add( page );
    when( configuration.getAdapter( UIDescriptor.class ) ).thenReturn( contentHolder );
    UIImpl ui = new UIImpl( display, controller, configuration );
    ui.markInitialized();
    PageData data = mock( PageData.class );

    ui.getPageOperator().openPage( "foo", data );
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.ui.UIConfiguration

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.