void function ( ) { String loc0 = NOT_ACCEPTED_FILENAME + ACCEPTED_EXTENSIONS [ 0 ] ; IBasicFile loc1 = new DummyBasicFile ( BASE_DIR + loc0 ) ; IBasicFileFilter loc2 = new GenericBasicFileFilter ( null , ACCEPTED_EXTENSIONS ) ; Assert . assertTrue ( loc2 . accept ( loc1 ) ) ; }
this tests that the file is properly accepted because of it having a file extension of the accepted kind . note we purposely create the testfile with a filename other than the one that is marked as accepted concode_field_sep String path concode_elem_sep String NOT_ACCEPTED_EXTENSION concode_elem_sep String BASE_DIR_PLUS_ONE_EXTRA_DIR concode_elem_sep String ACCEPTED_FILENAME concode_elem_sep String[] ACCEPTED_EXTENSIONS concode_elem_sep String BASE_DIR concode_elem_sep String NOT_ACCEPTED_FILENAME concode_elem_sep boolean directory concode_field_sep String getName concode_elem_sep String getExtension concode_elem_sep String getFullPath concode_elem_sep void testDirectoryIsProperlyAccepted concode_elem_sep void testFileIsProperlyDiscardedBecauseOfName concode_elem_sep void tearDown concode_elem_sep void testFileIsProperlyAcceptedByNameAndExtension concode_elem_sep void testDirectoryIsProperlyDiscarded concode_elem_sep String getPath concode_elem_sep void setUp concode_elem_sep InputStream getContents concode_elem_sep void testFileIsProperlyAcceptedByNameSubsetOnly concode_elem_sep void testFileIsProperlyDiscardedBecauseOfExtension concode_elem_sep void testFileIsProperlyAcceptedByNameOnly concode_elem_sep boolean isDirectory