Package com.eclipsesource.tabris.print

Examples of com.eclipsesource.tabris.print.PrintListener


  }

  @Test
  public void testDelegatesError() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener = mock( PrintListener.class );
    print.addPrintListener( listener );
    JsonObject properties = new JsonObject();
    properties.add( "printer", "" );
    properties.add( "jobName", "" );
    properties.add( "message", "" );


  }

  @Test
  public void testDelegatesErrorWithoutProperties() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener = mock( PrintListener.class );
    print.addPrintListener( listener );

    print.print( "http://localhost/file.pdf", createOptions() );
    environment.dispatchNotifyOnServiceObject( "Error", new JsonObject() );

  }

  @Test
  public void testDelegatesErrorToAllListeners() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener1 = mock( PrintListener.class );
    PrintListener listener2 = mock( PrintListener.class );
    print.addPrintListener( listener1 );
    print.addPrintListener( listener2 );
    JsonObject properties = new JsonObject();
    properties.add( "printer", "" );
    properties.add( "jobName", "" );

  }

  @Test
  public void testDelegatesCancel() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener = mock( PrintListener.class );
    print.addPrintListener( listener );
    JsonObject properties = new JsonObject();
    properties.add( "printer", "" );
    properties.add( "jobName", "" );

  }

  @Test
  public void testDelegatesCancelWithoutProperties() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener = mock( PrintListener.class );
    print.addPrintListener( listener );

    print.print( "http://localhost/file.pdf", createOptions() );
    environment.dispatchNotifyOnServiceObject( "Cancel", new JsonObject() );

  }

  @Test
  public void testDelegatesCancelToAllListeners() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener1 = mock( PrintListener.class );
    PrintListener listener2 = mock( PrintListener.class );
    print.addPrintListener( listener1 );
    print.addPrintListener( listener2 );
    JsonObject properties = new JsonObject();
    properties.add( "printer", "" );
    properties.add( "jobName", "" );

  }

  @Test
  public void testDelegatesSuccess() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener = mock( PrintListener.class );
    print.addPrintListener( listener );
    JsonObject properties = new JsonObject();
    properties.add( "printer", "" );
    properties.add( "jobName", "" );

  }

  @Test
  public void testDelegatesSuccessWithoutProperties() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener = mock( PrintListener.class );
    print.addPrintListener( listener );

    print.print( "http://localhost/file.pdf", createOptions() );
    environment.dispatchNotifyOnServiceObject( "Success", new JsonObject() );

  }

  @Test
  public void testDelegatesSuccessToAllListeners() {
    PrinterImpl print = new PrinterImpl();
    PrintListener listener1 = mock( PrintListener.class );
    PrintListener listener2 = mock( PrintListener.class );
    print.addPrintListener( listener1 );
    print.addPrintListener( listener2 );
    JsonObject properties = new JsonObject();
    properties.add( "printer", "" );
    properties.add( "jobName", "" );

TOP

Related Classes of com.eclipsesource.tabris.print.PrintListener

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.