throw new RuntimeException( e );
}
}
public void testGetSpreadsheetByVersion() {
ResourceHandler rHandler = new SvnResourceHandler();
rHandler.setRepositoryUrl( svnUrl );
rHandler.setCredentials( "mrtrout",
"drools" );
RepositoryBean bean = new RepositoryBean();
bean.setName( "test" );
bean.setResourceType( ResourceType.XLS_FILE );
//this value is unique to your subversion implementation
bean.setVersion( "1" );
try {
File f = new File( testFilePath + "/spreadsheets/test.xls" );
// System.out.println(rHandler.getResourceStream(bean));
assertEquals( SvnUtil.getByteArrayOutputFromFile( f ).toString(),
rHandler.getResourceStream( bean ).toString() );
} catch ( Exception e ) {
throw new RuntimeException( e );
}
}