org.apache.maven.plugin.clean
Class CleanMojoTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.codehaus.plexus.PlexusTestCase
              extended by org.apache.maven.plugin.testing.AbstractMojoTestCase
                  extended by org.apache.maven.plugin.clean.CleanMojoTest
All Implemented Interfaces:
junit.framework.Test

public class CleanMojoTest
extends AbstractMojoTestCase

Test the clean mojo.

Version:
$Id: CleanMojoTest.html 828303 2012-08-07 22:10:04Z hboutemy $
Author:
Vincent Siveton

Field Summary
 
Fields inherited from class org.codehaus.plexus.PlexusTestCase
basedir, container
 
Constructor Summary
CleanMojoTest()
           
 
Method Summary
protected  void setUp()
          
protected  void tearDown()
          
 void testBasicClean()
          Tests the simple removal of directories
 void testCleanEmptyDirectories()
          Tests that no exception is thrown when all internal variables are empty and that it doesn't just remove whats there
 void testCleanInvalidDirectory()
          Tests the removal of a directory as file
 void testCleanLockedFile()
          Test the removal of a locked file on Windows systems.
 void testCleanLockedFileWithNoError()
          Test the removal of a locked file on Windows systems.
 void testCleanNestedStructure()
          Tests the removal of files and nested directories
 void testFilesetsClean()
          Tests the removal of files using fileset
 void testMissingDirectory()
          Tests the removal of a missing directory
 
Methods inherited from class org.apache.maven.plugin.testing.AbstractMojoTestCase
configureMojo, configureMojo, extractPluginConfiguration, extractPluginConfiguration, getVariablesAndValuesFromObject, getVariablesAndValuesFromObject, getVariableValueFromObject, lookupEmptyMojo, lookupEmptyMojo, lookupMojo, lookupMojo, lookupMojo, setVariableValueToObject
 
Methods inherited from class org.codehaus.plexus.PlexusTestCase
createContainerInstance, customizeContext, customizeContext, getBasedir, getClassLoader, getConfiguration, getConfiguration, getContainer, getCustomConfiguration, getResourceAsStream, getTestFile, getTestFile, getTestPath, getTestPath, lookup, lookup, release
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CleanMojoTest

public CleanMojoTest()
Method Detail

setUp

protected void setUp()
              throws Exception

Overrides:
setUp in class AbstractMojoTestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception

Overrides:
tearDown in class org.codehaus.plexus.PlexusTestCase
Throws:
Exception

testBasicClean

public void testBasicClean()
                    throws Exception
Tests the simple removal of directories

Throws:
Exception

testCleanNestedStructure

public void testCleanNestedStructure()
                              throws Exception
Tests the removal of files and nested directories

Throws:
Exception

testCleanEmptyDirectories

public void testCleanEmptyDirectories()
                               throws Exception
Tests that no exception is thrown when all internal variables are empty and that it doesn't just remove whats there

Throws:
Exception

testFilesetsClean

public void testFilesetsClean()
                       throws Exception
Tests the removal of files using fileset

Throws:
Exception

testCleanInvalidDirectory

public void testCleanInvalidDirectory()
                               throws Exception
Tests the removal of a directory as file

Throws:
Exception

testMissingDirectory

public void testMissingDirectory()
                          throws Exception
Tests the removal of a missing directory

Throws:
Exception

testCleanLockedFile

public void testCleanLockedFile()
                         throws Exception
Test the removal of a locked file on Windows systems.
Note: Unix systems doesn't lock any files.

Throws:
Exception

testCleanLockedFileWithNoError

public void testCleanLockedFileWithNoError()
                                    throws Exception
Test the removal of a locked file on Windows systems.
Note: Unix systems doesn't lock any files.

Throws:
Exception


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.