Package org.machanism.machai.gw
Class FileProcessorTest
java.lang.Object
org.machanism.machai.gw.FileProcessorTest
Unit tests for the
FileProcessor covering all public and protected methods.
Example usage:
FileProcessor processor = new FileProcessor(mockProvider);
processor.setInheritance(true);
assertTrue(processor.isInheritance());
These tests validate the configuration parameters, correct working directory logic, and document scanning API behavior. Validates edge cases for inheritance and parent guidance settings.
- Since:
- 0.0.2
- Author:
- Viktor Tovstyi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidsetUp()(package private) voidTests getRootDir returns correct directory.(package private) voidTests if setInheritance and isInheritance work correctly.(package private) voidTests if setUseParentsGuidances and isUseParentsGuidances work as expected.(package private) voidTests scanDocuments on non-existent directory does not throw.(package private) voidTests scanFolder logic with simple File directory stub.
-
Constructor Details
-
FileProcessorTest
FileProcessorTest()
-
-
Method Details
-
setUp
@BeforeEach void setUp() -
testInheritanceFlag
@Test void testInheritanceFlag()Tests if setInheritance and isInheritance work correctly. -
testParentGuidanceFlag
@Test void testParentGuidanceFlag()Tests if setUseParentsGuidances and isUseParentsGuidances work as expected. -
testGetRootDirReturnsInput
@Test void testGetRootDirReturnsInput()Tests getRootDir returns correct directory. -
testScanDocumentsDoesNotThrowOnNonExistentDirectory
@Test @Disabled("Scanning files in a non-existent directory should not throw, but may require environment mocks.") void testScanDocumentsDoesNotThrowOnNonExistentDirectory()Tests scanDocuments on non-existent directory does not throw. -
testScanFolderIntegration
@Test @Disabled("Integration test: requires file system stub/mocks.") void testScanFolderIntegration() throws IOExceptionTests scanFolder logic with simple File directory stub.- Throws:
IOException
-