001/** 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 * 006 */ 007package org.fcrepo.migration.foxml; 008 009import org.junit.Assert; 010import org.junit.Test; 011import org.slf4j.Logger; 012 013import java.io.File; 014import java.io.IOException; 015import static org.slf4j.LoggerFactory.getLogger; 016 017/** 018 * @author awoods 019 * @since 2020-01-27 020 */ 021public class AkubraFSIDResolverIT { 022 023 final static Logger LOGGER = getLogger(AkubraFSIDResolverIT.class); 024 025 private static AkubraFSIDResolver resolver; 026 027 @Test 028 public void testWithEmptyIndexDir() throws IOException { 029 030 final File testDir = new File("target/test/akubra"); 031 testDir.mkdirs(); 032 033 // Create empty dir 034 final File indexDir = new File(testDir, "index"); 035 indexDir.mkdirs(); 036 037 final File dsRoot = new File("src/test/resources/akubraFS"); 038 039 resolver = new AkubraFSIDResolver(indexDir, dsRoot); 040 041 final File[] files = indexDir.listFiles(); 042 Assert.assertTrue("There should be index files in the previously empty dir", files.length > 0); 043 } 044 045}