I am busy learning fitnesse at the moment and have not been able to figure out how to work 开发者_JS百科out how to get an absolute path from a relative url. I want to be able to upload test files to the files directory on a fitnesse server and then read those files in my test fixture. e.g.
public void ReadTextFileContent(string fileName)
{
Text = File.ReadAllText(fileName);
}
Note: The fileName would be the fully qualified path to the file. I want to be able to define this path in terms of the relative path to the fitnesse server so that in a multi user setup, users will not need to have their fitnesse server running on the same drive or path.
The current directory (System.Environment.CurrentDirectory) will be the path in your FitNesee server -d parameter (e.g. java -jar \apps\fitnesse\fitnesse.jar -d path\to\my\fitnesse\wiki). From there you can look in FitNesseRoot\files.
精彩评论