Package com.eclipsesource.tabris.tracking.internal

Examples of com.eclipsesource.tabris.tracking.internal.EventDispatcher


    verify( configuration ).addActionListener( any( SearchActionListener.class ) );
  }

  @Test( expected = IllegalArgumentException.class )
  public void testFailsWithNullExceptionHandler() {
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );

    tracking.setUncaughtExceptionHandler( null );
  }
View Full Code Here


  }

  @Test
  public void testSetsExceptionHandlerOnDispatcher() {
    UncaughtExceptionHandler handler = mock( UncaughtExceptionHandler.class );
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );

    tracking.setUncaughtExceptionHandler( handler );

    verify( dispatcher ).setUncaughtExceptionHandler( handler );
View Full Code Here

    verify( dispatcher ).setUncaughtExceptionHandler( handler );
  }

  @Test
  public void testDispatchesPageTransition() {
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );
    PageConfiguration pageConfiguration = mock( PageConfiguration.class );
    UIConfiguration configuration = mock( UIConfiguration.class );

    tracking.attach( configuration );
View Full Code Here

    captor.getValue().after( ui, mock( Page.class ), mock( Page.class ) );
  }

  @Test
  public void testDispatchesActionExecution() {
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );
    ActionConfiguration actionConfiguration = mock( ActionConfiguration.class );
    when( actionConfiguration.getId() ).thenReturn( "bar" );
    UIConfiguration configuration = mock( UIConfiguration.class );
View Full Code Here

    assertSame( tracking.getTrackers(), captor.getValue().getTrackers() );
  }

  @Test
  public void testDispatchesEventExecution() {
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );

    tracking.submitEvent( display, "foo" );

    ArgumentCaptor<DispatchTask> captor = ArgumentCaptor.forClass( DispatchTask.class );
View Full Code Here

    tracking.submitEvent( display, "" );
  }

  @Test
  public void testDispatchesOrder() {
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );
    Order order = new Order( "foo", BigDecimal.ONE );

    tracking.submitOrder( display, order );
View Full Code Here

    captor.getValue().executed( ui, mock( Action.class ) );
  }

  @Test
  public void testDispatchesSearch() {
    EventDispatcher dispatcher = mock( EventDispatcher.class );
    Tracking tracking = new Tracking( dispatcher, new ArrayList<Tracker>() );
    ActionConfiguration actionConfiguration = mock( ActionConfiguration.class );
    when( actionConfiguration.getId() ).thenReturn( "bar" );
    UIConfiguration configuration = mock( UIConfiguration.class );
View Full Code Here

TOP

Related Classes of com.eclipsesource.tabris.tracking.internal.EventDispatcher

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.