FolderLoaderUtils { @Nullable static File getSoapResourcesRootDir(File rootDir) { final File soapResourceRootDir = new File(rootDir, SOAP_RESOURCES_FOLDER); if (!soapResourceRootDir.exists()) { return null; } else if (!soapResourceRootDir.isDirectory()) { throw new ConfigLoadException("Expected directory but was file: " + soapResourceRootDir); } return soapResourceRootDir; } private  FolderLoaderUtils(); static void createFolders(Bundle bundle, File rootDir, Map<String, E> folderableMap); static final String SOAP_RESOURCES_FOLDER; }
@Test @ExtendWith(TemporaryFolderExtension.class) void getWsdlRootNoWsdlDirTest(TemporaryFolder temporaryFolder) { assertNull(getSoapResourcesRootDir(temporaryFolder.getRoot())); }
@Test @ExtendWith(TemporaryFolderExtension.class) void getWsdlRootDirWsdlFileErrorTest(TemporaryFolder temporaryFolder) throws IOException { temporaryFolder.createFile(SOAP_RESOURCES_FOLDER); assertThrows(ConfigLoadException.class, () -> getSoapResourcesRootDir(temporaryFolder.getRoot())); }
@Test @ExtendWith(TemporaryFolderExtension.class) void getWsdlRootDirTest(TemporaryFolder temporaryFolder) { temporaryFolder.createDirectory(SOAP_RESOURCES_FOLDER); assertNotNull(getSoapResourcesRootDir(temporaryFolder.getRoot())); }