maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon WagonTestCase.java
Date Sat, 24 Apr 2004 17:38:27 GMT
jvanzyl     2004/04/24 10:38:27

  Modified:    wagon-api/src/main/java/org/apache/maven/wagon
                        WagonTestCase.java
  Log:
  o adjusting the abstract test case so that fixtures can be setup for the
    entire testing session of a wagon. Many of the wagons required embedded
    servers to run and we don't want them starting/stopping for each test.
  
  Revision  Changes    Path
  1.3       +24 -12    maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/WagonTestCase.java
  
  Index: WagonTestCase.java
  ===================================================================
  RCS file: /home/cvs/maven-wagon/wagon-api/src/main/java/org/apache/maven/wagon/WagonTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WagonTestCase.java	24 Apr 2004 15:51:25 -0000	1.2
  +++ WagonTestCase.java	24 Apr 2004 17:38:26 -0000	1.3
  @@ -73,11 +73,9 @@
       //    repository url of file://${basedir}/target/file-repository.
       // ----------------------------------------------------------------------
   
  -    protected void setUp()
  +    protected void setupRepositories()
           throws Exception
       {
  -        super.setUp();
  -
           resource = "test-resource.txt";
   
           modelReader = new MavenXpp3Reader();
  @@ -121,12 +119,12 @@
           getContainer().addContextValue( "test.repository", localRepositoryPath );
       }
   
  -    protected void setupFileRoundTripTesting()
  +    protected void setupWagonTestingFixtures()
           throws Exception
       {
       }
   
  -    protected void setupArtifactRoundTripTesting()
  +    protected void tearDownWagonTestingFixtures()
           throws Exception
       {
       }
  @@ -162,6 +160,24 @@
       }
   
       // ----------------------------------------------------------------------
  +    //
  +    // ----------------------------------------------------------------------
  +
  +    public void testWagon()
  +        throws Exception
  +    {
  +        setupRepositories();
  +
  +        setupWagonTestingFixtures();
  +
  +        fileRoundTripTesting();
  +
  +        artifactRoundTripTesting();
  +
  +        tearDownWagonTestingFixtures();
  +    }
  +
  +    // ----------------------------------------------------------------------
       // File <--> File round trip testing
       // ----------------------------------------------------------------------
       // We are testing taking a file, our sourcefile, and placing it into the
  @@ -200,13 +216,11 @@
           wagon.disconnect();
       }
   
  -    public void testFileRoundTrip()
  +    protected void fileRoundTripTesting()
           throws Exception
       {
           message( "File round trip testing ..." );
   
  -        setupFileRoundTripTesting();
  -
           putFile();
   
           getFile();
  @@ -256,12 +270,10 @@
           wagon.disconnect();
       }
   
  -    public void testArtifactRoundTrip()
  +    protected void artifactRoundTripTesting()
           throws Exception
       {
           message( "Artifact round trip testing ..." );
  -
  -        setupArtifactRoundTripTesting();
   
           putArtifact();                
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-cvs-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-cvs-help@maven.apache.org


Mime
View raw message