001    package org.hackystat.sensor.ant.dependencyfinder;
002    
003    import static org.junit.Assert.assertEquals;
004    
005    import java.io.File;
006    import org.hackystat.sensor.ant.test.AntSensorTestHelper;
007    import org.junit.Test;
008    
009    /**
010     * Tests the Ant DependencyFinder sensor.
011     *
012     * @author Philip Johnson
013     */
014    public class TestDependencyFinderSensor extends AntSensorTestHelper {
015    
016      /**
017       * Tests sensor by processing some test files. 
018       * @throws Exception If a problem occurs.
019       */
020      @Test
021      public void testDependencyFinderSensor() throws Exception {
022        DependencyFinderSensor sensor = new DependencyFinderSensor(host, user, user);
023        sensor.setVerbose("off");
024        int instances = 0;
025        // Process the test files.
026        for (File file : super.getXmlFiles(System.getProperty("dependencyfindertestfiles"))) {
027          instances += sensor.processDependencyFinderXmlFile(file);
028        }
029        assertEquals("Currently zero due to no source files available", 0, instances);
030      }  
031    }