Package org.eclipse.aether.transfer

Examples of org.eclipse.aether.transfer.TransferEvent


    new DetailedProgressReporter(this.session, this.out);
  }

  @Test
  public void downloading() throws TransferCancelledException {
    TransferEvent startedEvent = new TransferEvent.Builder(this.session,
        this.resource).build();
    this.session.getTransferListener().transferStarted(startedEvent);

    assertEquals(String.format("Downloading: %s%s%n", REPOSITORY, ARTIFACT),
        new String(this.baos.toByteArray()));
View Full Code Here


  @Test
  public void downloaded() throws InterruptedException {
    // Ensure some transfer time
    Thread.sleep(100);
    TransferEvent completedEvent = new TransferEvent.Builder(this.session,
        this.resource).addTransferredBytes(4096).build();
    this.session.getTransferListener().transferSucceeded(completedEvent);
    String message = new String(this.baos.toByteArray()).replace("\\", "/");
    assertThat(message, startsWith("Downloaded: " + REPOSITORY + ARTIFACT));
    assertThat(message, containsString("4KB at"));
View Full Code Here

TOP

Related Classes of org.eclipse.aether.transfer.TransferEvent

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.