Skip to content
Snippets Groups Projects
Select Git revision
  • snapshot
  • master default
  • BottleneckTestViaWordCounter-v1.1.2
  • BottleneckTextViaWordCounter-v2.0
  • mad/dynamicThreads
  • mad/AllMonitoring
  • loop_detection
  • mad/pipeChangeMonitoring
  • workstealing
  • DCParadigm
  • dynamicport
  • reduction-variable
  • fast-outputport-iteration
  • v2.1
  • v2.0
  • v1.1.2
  • v1.1.1
  • v1.1
  • v1.0
  • signal-final
  • multiple-ports-final
  • pipeline-with-method-call-final
22 results

FileSearcherTest.java

Blame
  • Forked from TeeTime / TeeTime
    1558 commits behind the upstream repository.
    user avatar
    Christian Wulf authored
    0c2a8872
    History
    FileSearcherTest.java 827 B
    package teetime.util.classpath;
    
    import java.io.IOException;
    import java.net.URL;
    import java.util.List;
    
    import org.junit.Assert;
    import org.junit.Test;
    
    import teetime.util.classpath.FileSearcher;
    
    public class FileSearcherTest {
    
    	public FileSearcherTest() {}
    
    	@Test
    	public void fileInClasspath() throws IOException {
    		final List<URL> list = FileSearcher.loadResources("pipe-factories.conf");
    		Assert.assertEquals(false, list.isEmpty()); 
    	}
    
    	@Test
    	public void multipleFiles() throws IOException {
    		final List<URL> list = FileSearcher.loadResources("LICENSE.txt");
    		Assert.assertEquals(true, list.size() > 1); 
    	}
    
    	@Test
    	public void missingFile() throws IOException {
    		final List<URL> list = FileSearcher.loadResources("filethatdoesnotexistinanyproject.nope");
    		Assert.assertEquals(true, list.isEmpty()); 
    	}
    
    }