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