You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ka...@apache.org on 2003/05/24 00:51:54 UTC

cvs commit: maven-new/core/src/test/org/apache/maven/artifact/layout DefaultRepositoryLayoutTest.java

kaz         2003/05/23 15:51:54

  Modified:    core/src/test/org/apache/maven TestUtils.java
               core/src/test/org/apache/maven/artifact/factory
                        DefaultArtifactFactoryTest.java
               core/src/test/org/apache/maven/artifact/layout
                        DefaultRepositoryLayoutTest.java
  Log:
  Removing tabs from the files.
  
  Revision  Changes    Path
  1.3       +8 -8      maven-new/core/src/test/org/apache/maven/TestUtils.java
  
  Index: TestUtils.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/test/org/apache/maven/TestUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestUtils.java	23 May 2003 12:53:26 -0000	1.2
  +++ TestUtils.java	23 May 2003 22:51:54 -0000	1.3
  @@ -69,9 +69,9 @@
   public class TestUtils
   {
       /**
  -    	* Basedir for all file I/O. Important when running tests from
  -    	* the reactor.
  -    	*/
  +        * Basedir for all file I/O. Important when running tests from
  +        * the reactor.
  +        */
       public final static String BASEDIR = System.getProperty("basedir");
   
       /**
  @@ -114,10 +114,10 @@
        */
       private static Project getProjectSample(String basedir, String path) throws Exception
       {
  -		String testDocument = basedir + path;
  -		DefaultProjectUnmarshaller projectUnmarshaller = new DefaultProjectUnmarshaller();
  -		Reader reader = new FileReader( testDocument );		
  -		Project project = projectUnmarshaller.parse(reader);
  +        String testDocument = basedir + path;
  +        DefaultProjectUnmarshaller projectUnmarshaller = new DefaultProjectUnmarshaller();
  +        Reader reader = new FileReader( testDocument );        
  +        Project project = projectUnmarshaller.parse(reader);
           return project;
       }
   }
  
  
  
  1.5       +41 -41    maven-new/core/src/test/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java
  
  Index: DefaultArtifactFactoryTest.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/test/org/apache/maven/artifact/factory/DefaultArtifactFactoryTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultArtifactFactoryTest.java	23 May 2003 19:07:40 -0000	1.4
  +++ DefaultArtifactFactoryTest.java	23 May 2003 22:51:54 -0000	1.5
  @@ -126,46 +126,46 @@
   
   
           // 2 Check if artifacts are not null       
  -		Artifact artifact1 = ( Artifact ) artifacts.get( 0 );
  -		Artifact artifact2 = ( Artifact ) artifacts.get( 1 );
  -		String msg1 = "No artifact should be null.";        
  -		assertNotNull( msg1,artifact1 );
  -		assertNotNull( msg1,artifact2 );
  -					
  -	    
  -	    //3 Check if paths were build correctly
  -		String msg2="Artifact has incorrect path.";		
  -		// a1
  -		String expectedPath1 = "g1/jars/d1-1.0.jar" ;
  -		String actualPath1= artifact1.getPath();
  -		assertEquals( msg2,expectedPath1,actualPath1 );
  -		// a2
  -		String expectedPath2 = "g2/jars/d2-2.0.jar"; 
  -		String actualPath2= artifact2.getPath();
  -				
  -		assertEquals( msg2,expectedPath2,actualPath2 );
  +        Artifact artifact1 = ( Artifact ) artifacts.get( 0 );
  +        Artifact artifact2 = ( Artifact ) artifacts.get( 1 );
  +        String msg1 = "No artifact should be null.";        
  +        assertNotNull( msg1,artifact1 );
  +        assertNotNull( msg1,artifact2 );
  +                    
  +        
  +        //3 Check if paths were build correctly
  +        String msg2="Artifact has incorrect path.";        
  +        // a1
  +        String expectedPath1 = "g1/jars/d1-1.0.jar" ;
  +        String actualPath1= artifact1.getPath();
  +        assertEquals( msg2,expectedPath1,actualPath1 );
  +        // a2
  +        String expectedPath2 = "g2/jars/d2-2.0.jar"; 
  +        String actualPath2= artifact2.getPath();
  +                
  +        assertEquals( msg2,expectedPath2,actualPath2 );
   
  -		//4 Check if files were set correctly
  -		String msg3="Artifact has incorrect path.";				
  -		String repositoryPath = artifactFactory.getMavenRepoLocal( project ) ;
  -		// a1
  -		File expectedFile1 = new File ( repositoryPath, "g1/jars/d1-1.0.jar" ) ;
  -		File actualFile1= artifact1.getFile();
  -		assertEquals( msg3,expectedPath1,actualPath1 );
  -		// a2
  -		File expectedFile2 = new File ( repositoryPath, "g2/jars/d2-2.0.jar"); 
  -		File actualFile2= artifact2.getFile();
  -				
  -		assertEquals( msg3,expectedPath2,actualPath2 );
  -		
  -		
  -		
  -		//5 check if artifact's fields were set properly
  -		
  -		assertEquals( "Group was incorrectly set." , artifact1.getGroupId() , "g1" );
  -		assertEquals( "ArtifactId was incorrectly set." , artifact1.getArtifactId() , "d1" );
  -		assertEquals( "Version was incorrectly set." , artifact1.getVersion() , "1.0" );
  -		assertEquals( "Type was incorrectly set." , artifact1.getType() , "jar" );
  +        //4 Check if files were set correctly
  +        String msg3="Artifact has incorrect path.";                
  +        String repositoryPath = artifactFactory.getMavenRepoLocal( project ) ;
  +        // a1
  +        File expectedFile1 = new File ( repositoryPath, "g1/jars/d1-1.0.jar" ) ;
  +        File actualFile1= artifact1.getFile();
  +        assertEquals( msg3,expectedPath1,actualPath1 );
  +        // a2
  +        File expectedFile2 = new File ( repositoryPath, "g2/jars/d2-2.0.jar"); 
  +        File actualFile2= artifact2.getFile();
  +                
  +        assertEquals( msg3,expectedPath2,actualPath2 );
  +        
  +        
  +        
  +        //5 check if artifact's fields were set properly
  +        
  +        assertEquals( "Group was incorrectly set." , artifact1.getGroupId() , "g1" );
  +        assertEquals( "ArtifactId was incorrectly set." , artifact1.getArtifactId() , "d1" );
  +        assertEquals( "Version was incorrectly set." , artifact1.getVersion() , "1.0" );
  +        assertEquals( "Type was incorrectly set." , artifact1.getType() , "jar" );
   
       }
   
  
  
  
  1.3       +2 -2      maven-new/core/src/test/org/apache/maven/artifact/layout/DefaultRepositoryLayoutTest.java
  
  Index: DefaultRepositoryLayoutTest.java
  ===================================================================
  RCS file: /home/cvs/maven-new/core/src/test/org/apache/maven/artifact/layout/DefaultRepositoryLayoutTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultRepositoryLayoutTest.java	23 May 2003 18:36:19 -0000	1.2
  +++ DefaultRepositoryLayoutTest.java	23 May 2003 22:51:54 -0000	1.3
  @@ -120,7 +120,7 @@
           assertEquals(msg, expectedPath1, actualPath1);
   
           Artifact ejb = new DefaultArtifact();
  -		ejb.setGroupId("boo");
  +        ejb.setGroupId("boo");
           ejb.setArtifactId("foo");        
           ejb.setVersion("1.1.1");
           ejb.setType("ejb");
  
  
  

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