3

我目前正在通过教程在此处使用 C# 使用fitnesse http://schuchert.wikispaces.com/FitNesse.Tutorials.0.CSharp 我目前卡住了,因为我的代码/他的代码无法按预期工作. 我在这个程序中没有足够的知识来成功地自己解决它。我的页面代码是:

!define TEST_SYSTEM {slim}
!define TEST_RUNNER {c:\Projects\fitsharp\Runner.exe}
!define COMMAND_PATTERN {%m -r fitnesse.slim.Runner, c:\Projects\fitsharp\fitsharp.dll %p}

!path c:\Projects\C_Sharp\Digital Video Recorder\Digital Video Recorder\bin\Debug\Digital Video Recorder.dll

!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}

!|import|
|Digital Video Recorder|

!|Create Programs                                        |
|Name |Channel|DayOfWeek|TimeOfDay|DurationInMinutes|id? |
|House|4      |Monday   |19:00    |60               |$ID=|

dll的路径绝对是路径。但是当我对此进行测试时,它会出现一个异常:

System.ArgumentException: String cannot have zero length.
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at fitSharp.Machine.Engine.CurrentDomain.LoadAssembly(String assemblyPath)
   at fitSharp.Machine.Engine.ApplicationUnderTest.Assemblies.AddAssembly(String assemblyName)
   at fitSharp.Machine.Application.Shell.Execute()
   at fitSharp.Machine.Application.Shell.Run(IList`1 commandLineArguments)

我已经摆弄了一段时间,但我似乎无法让它工作

4

1 回答 1

3

删除逗号后面的空格:

!define COMMAND_PATTERN {%m -r fitnesse.slim.Runner, c:\Projects\fitsharp\fitsharp.dll %p}

并将第一部分更改为 fitSharp.Slim.Service.Runner (原始)。

于 2012-04-10T10:49:00.100 回答