org.sonatype.aether.test.util.connector.suite
Class TransferEventTester

java.lang.Object
  extended by org.sonatype.aether.test.util.connector.suite.TransferEventTester

public class TransferEventTester
extends java.lang.Object

Utility class for connector tests. Provides methods to check the emitted transfer events for artifact and metadata up- and downloads.

Author:
Benjamin Hanzelmann

Constructor Summary
TransferEventTester()
           
 
Method Summary
static void testFailedTransferEvents(RepositoryConnectorFactory factory, TestRepositorySystemSession session, RemoteRepository repository)
          Test the order of events and their properties for the unsuccessful up- and download of artifact and metadata.
static void testSuccessfulTransferEvents(RepositoryConnectorFactory factory, TestRepositorySystemSession session, RemoteRepository repository)
          Test the order of events and their properties for the successful up- and download of artifact and metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransferEventTester

public TransferEventTester()
Method Detail

testSuccessfulTransferEvents

public static void testSuccessfulTransferEvents(RepositoryConnectorFactory factory,
                                                TestRepositorySystemSession session,
                                                RemoteRepository repository)
                                         throws NoRepositoryConnectorException,
                                                java.io.IOException
Test the order of events and their properties for the successful up- and download of artifact and metadata.

Throws:
NoRepositoryConnectorException
java.io.IOException

testFailedTransferEvents

public static void testFailedTransferEvents(RepositoryConnectorFactory factory,
                                            TestRepositorySystemSession session,
                                            RemoteRepository repository)
                                     throws NoRepositoryConnectorException,
                                            java.io.IOException
Test the order of events and their properties for the unsuccessful up- and download of artifact and metadata. Failure is triggered by setting the file to transfer to null for uploads, and asking for a non-existent item for downloads.

Throws:
NoRepositoryConnectorException
java.io.IOException


Copyright © 2010 Sonatype, Inc.. All Rights Reserved.