public void RunFubu(string commandLine)
{
Console.WriteLine("Running 'fubu {0}'", commandLine);
var fileName = Path.Combine(_solutionDirectory, @"src\fubu\bin\debug\fubu.exe");
var startup = new ProcessStartInfo(fileName, commandLine){
CreateNoWindow = true,
RedirectStandardError = true,
RedirectStandardInput = true,
RedirectStandardOutput = false,
UseShellExecute = false,
WorkingDirectory = _solutionDirectory
};
try
{
var process = Process.Start(startup);
process.WaitForExit();
if (process.ExitCode != 0)
{
StoryTellerAssert.Fail("Command failed! -- " + commandLine);
}
}
catch (StorytellerAssertionException)
{
throw;
}
catch (Exception e)
{
throw new ApplicationException("Trying to run " + fileName, e);
}
}