我目前正在努力完成使用fitnesse和C#的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)
我已经习惯了这一段时间,但我似乎无法让它工作
答案 0 :(得分:3)
从以下位置删除逗号后面的空格:
!define COMMAND_PATTERN {%m -r fitnesse.slim.Runner, c:\Projects\fitsharp\fitsharp.dll %p}
并将第一部分更改为fitSharp.Slim.Service.Runner(原文)。