Package org.eclipse.rap.rwt.remote

Examples of org.eclipse.rap.rwt.remote.RemoteObject


  public TabrisEnvironment environment = new TabrisEnvironment();

  @Test
  public void testCreatesRemoteObject() {
    CloudPushImpl cloudPush = new CloudPushImpl();
    RemoteObject remoteObject = cloudPush.getRemoteObject();

    assertNotNull( remoteObject );
  }
View Full Code Here


  @Test
  public void testCreatesRemoteObjectOnInitialization() {
    CloudPushImpl cloudPush = new CloudPushImpl();

    RemoteObject remoteObject = cloudPush.getRemoteObject();
    RemoteObject remoteObject2 = cloudPush.getRemoteObject();

    assertSame( remoteObject, remoteObject2 );
  }
View Full Code Here

    assertTrue( Serializable.class.isAssignableFrom( CameraListener.class ) );
  }

  @Test
  public void testSetsNoInitialCameraOptionsWithDefaultOptions() {
    RemoteObject remoteObject = environment.getServiceObject();

    new CameraImpl();

    verify( remoteObject, never() ).set( eq( "resolution" ), any( JsonValue.class ) );
    verify( remoteObject, never() ).set( eq( "saveToAlbum" ), any( JsonValue.class ) );
View Full Code Here

    verify( remoteObject, never() ).set( eq( "compressionQuality" ), any( JsonValue.class ) );
  }

  @Test
  public void testSendsOpenWithTakePhotoCall() {
    RemoteObject remoteObject = environment.getServiceObject();
    Camera camera = new CameraImpl();
    CameraListener listener = mock( CameraListener.class );
    camera.addCameraListener( listener );

    camera.takePicture( createOptions() );
View Full Code Here

    assertTrue( Serializable.class.isAssignableFrom( GeolocationListener.class ) );
  }

  @Test
  public void testInitialFlavor() {
    RemoteObject remoteObject = environment.getServiceObject();

    new GeolocationImpl();

    verify( remoteObject ).set( "needsPosition", "NEVER" );
  }
View Full Code Here

    verify( remoteObject ).set( "needsPosition", "NEVER" );
  }

  @Test
  public void testSetsOptionsWhenGetLocation() {
    RemoteObject remoteObject = environment.getServiceObject();
    GeolocationImpl geolocation = new GeolocationImpl();
    GeolocationOptions options = new GeolocationOptions();
    GeolocationListener listener = mock( GeolocationListener.class );
    geolocation.addGeolocationListener( listener );
View Full Code Here

    geolocation.determineCurrentPosition( null );
  }

  @Test
  public void testSetsOptionsWhenWatch() {
    RemoteObject remoteObject = environment.getServiceObject();
    GeolocationImpl geolocation = new GeolocationImpl();
    GeolocationOptions options = new GeolocationOptions();
    GeolocationListener listener = mock( GeolocationListener.class );
    geolocation.addGeolocationListener( listener );
View Full Code Here

  }


  @Test
  public void testSetsNeverWhenClearWatch() {
    RemoteObject remoteObject = environment.getServiceObject();
    GeolocationImpl geolocation = new GeolocationImpl();

    geolocation.clearWatch();

    verify( remoteObject, times( 2 ) ).set( "needsPosition", "NEVER" );
View Full Code Here

    AppListener listener = mock( AppListener.class );
    app.addEventListener( PAUSE, listener );

    app.removeEventListener( PAUSE, listener );

    RemoteObject remoteObject = environment.getServiceObject();
    InOrder order = inOrder( remoteObject );
    order.verify( remoteObject ).listen( "Pause", true );
    order.verify( remoteObject ).listen( "Pause", false );
  }
View Full Code Here

    app.addEventListener( PAUSE, listener2 );

    app.removeEventListener( PAUSE, listener );
    app.removeEventListener( PAUSE, listener2 );

    RemoteObject remoteObject = environment.getServiceObject();
    InOrder order = inOrder( remoteObject );
    order.verify( remoteObject, times( 1 ) ).listen( "Pause", true );
    order.verify( remoteObject, times( 1 ) ).listen( "Pause", false );
  }
View Full Code Here

TOP

Related Classes of org.eclipse.rap.rwt.remote.RemoteObject

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.