Code example for FilenameFilter

Methods: accept

0
    } 
 
    @Test 
    public void testFilenameFilter() { 
        FilenameFilter filenameFilter = new GpxAndZipFilenameFilter(new GpxFilenameFilter());
        assertTrue(filenameFilter.accept(null, "foo.gpx"));
        assertTrue(filenameFilter.accept(null, "foo.zip"));
        assertTrue(filenameFilter.accept(null, "foo.ZIP"));
        assertFalse(filenameFilter.accept(null, "skip.me"));
        assertFalse(filenameFilter.accept(null, ".appledetritus010.gpx"));
    } 
 
    @Test 
    public void testHasSubFiles() throws Exception { 
        GpxFileIterAndZipFileIterFactory gpxFileIterAndZipFileIterFactory = PowerMock
                .createStrictMock(GpxFileIterAndZipFileIterFactory.class); 
        IGpxReaderIter gpxReaderIter1 = PowerMock.createStrictMock(IGpxReaderIter.class);
        IGpxReaderIter gpxReaderIter2 = PowerMock.createStrictMock(IGpxReaderIter.class);
        IGpxReader gpxReader1 = PowerMock.createStrictMock(IGpxReader.class);
        IGpxReader gpxReader2 = PowerMock.createStrictMock(IGpxReader.class);
        IGpxReader gpxReader3 = PowerMock.createStrictMock(IGpxReader.class);