Class AbstractFileSystemTestCase


  • public abstract class AbstractFileSystemTestCase
    extends org.testng.AssertJUnit
    An abstract test case which accesses the file system.

    It constructs an appropriate working directory which is test class specific.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterClass()  
      protected void cleanUpDirectoryBeforeTheTest​(java.io.File directory)
      Deletes, recreates and verifies that this is the empty directory
      protected java.io.File create​(java.lang.String name)
      Creates a File with name in the working directory.
      protected java.io.File createDirectoryInUnitTestRoot​(java.lang.String dirName)
      Creates a directory in the unit test root directory "targets/unit-test-wd"
      void setUp()  
      • Methods inherited from class org.testng.AssertJUnit

        assertEquals, assertEquals, 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 org.testng.internal.junit.ArrayAsserts

        assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNIT_TEST_WORKING_DIRECTORY

        protected static final java.lang.String UNIT_TEST_WORKING_DIRECTORY
        See Also:
        Constant Field Values
      • TARGETS_DIRECTORY

        protected static final java.lang.String TARGETS_DIRECTORY
        See Also:
        Constant Field Values
      • UNIT_TEST_ROOT_DIRECTORY

        protected static final java.io.File UNIT_TEST_ROOT_DIRECTORY
      • workingDirectory

        protected final java.io.File workingDirectory
    • Constructor Detail

      • AbstractFileSystemTestCase

        protected AbstractFileSystemTestCase()
      • AbstractFileSystemTestCase

        protected AbstractFileSystemTestCase​(boolean cleanAfterMethod)
    • Method Detail

      • create

        protected java.io.File create​(java.lang.String name)
        Creates a File with name in the working directory. Ensure it doesn't exist and is deleted on exit.
      • createDirectoryInUnitTestRoot

        protected final java.io.File createDirectoryInUnitTestRoot​(java.lang.String dirName)
        Creates a directory in the unit test root directory "targets/unit-test-wd"
      • setUp

        public void setUp()
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • cleanUpDirectoryBeforeTheTest

        protected void cleanUpDirectoryBeforeTheTest​(java.io.File directory)
        Deletes, recreates and verifies that this is the empty directory
      • afterClass

        public void afterClass()
                        throws java.io.IOException
        Throws:
        java.io.IOException