Package org.apache.maven.scm.provider.git.gitexe.command.remove

Examples of org.apache.maven.scm.provider.git.gitexe.command.remove.GitRemoveConsumer


    extends PlexusTestCase
{
   
    public void testConsumerRemovedFile()
    {
        GitRemoveConsumer consumer = new GitRemoveConsumer( new DefaultLog() );
       
        consumer.consumeLine( "rm 'project.xml'" );
       
        List<ScmFile> changedFiles = consumer.getRemovedFiles();
       
        assertNotNull( changedFiles );
        assertEquals( 1, changedFiles.size() );
    }
View Full Code Here


    }
   
    public void testLog1Consumer()
    throws Exception
    {
        GitRemoveConsumer consumer = new GitRemoveConsumer( new DefaultLog() );

        File f = getTestFile( "/src/test/resources/git/remove/gitrm.gitlog" );

        BufferedReader r = new BufferedReader( new FileReader( f ) );

        String line;

        while ( ( line = r.readLine() ) != null )
        {
            consumer.consumeLine( line );
        }

        List<ScmFile> changedFiles = consumer.getRemovedFiles();
       
        assertEquals( 2, changedFiles.size() );

        testScmFile( (ScmFile) changedFiles.get( 0 ), "src/main/java/Application.java", ScmFileStatus.DELETED );
        testScmFile( (ScmFile) changedFiles.get( 1 ), "src/test/java/Test.java" , ScmFileStatus.DELETED );
View Full Code Here

    }
    public void testEmptyLogConsumer()
    throws Exception
    {
        GitRemoveConsumer consumer = new GitRemoveConsumer( new DefaultLog() );

        File f = getTestFile( "/src/test/resources/git/remove/gitrm-empty.gitlog" );

        BufferedReader r = new BufferedReader( new FileReader( f ) );

        String line;

        while ( ( line = r.readLine() ) != null )
        {
            consumer.consumeLine( line );
        }

        List<ScmFile> changedFiles = consumer.getRemovedFiles();
       
        assertEquals( 0, changedFiles.size() );
   }   
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.git.gitexe.command.remove.GitRemoveConsumer

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.