test/java/fr/jayasoft/ivy/repository/vfs/VfsRepositoryTest.java
/**
	 * Validate that we get a non null Resource instance when
	 * passed a well-formed VfsURI pointing to a non-existent
	 * file.
	 *
	 */
Validate that we get a non null Resource instance when
passed a well-formed VfsURI pointing to a non-existent
file.
Validate that we get a non null Resource instance when passed a well - formed VfsURI pointing to a non - existent file .
public void testGetResourceValidNoExist() throws Exception {
		String testResource = VfsTestHelper.SCRATCH_DIR + "/nosuchfile.jar";
		Iterator vfsURIs = helper.createVFSUriSet(testResource).iterator();
		while (vfsURIs.hasNext()) {
			VfsURI vfsURI = (VfsURI) vfsURIs.next();
			if (scratchDir.exists()) {
				FileUtil.forceDelete(scratchDir);
			}
			try {
				assertNotNull(repo.getResource(vfsURI.toString()));
			} catch (IOException e) {
				fail("Unexpected IOException");
			}
		}
	}
public void testGetResourceValidNoExist ( ) throws Exception { String testResource = VfsTestHelper . SCRATCH_DIR + "/nosuchfile.jar" ; Iterator vfsURIs = helper . createVFSUriSet ( testResource ) . iterator ( ) ; while ( vfsURIs . hasNext ( ) ) { VfsURI vfsURI = ( VfsURI ) vfsURIs . next ( ) ; if ( scratchDir . exists ( ) ) { FileUtil . forceDelete ( scratchDir ) ; } try { assertNotNull ( repo . getResource ( vfsURI . toString ( ) ) ) ; } catch ( IOException e ) { fail ( "Unexpected IOException" ) ; } } }
Validate that we get a non null Resource instance when
 passed a well-formed VfsURI pointing to a non-existent
 file.
Validate that we get a non null Resource instance when passed a well - formed VfsURI pointing to a non - existent file .
// make sure the declared resource does not exist // this should not happen