gpt4 book ai didi

c# - 在 C# 中使用 fitnesse、fitsharp 和 slim

转载 作者:行者123 更新时间:2023-11-30 16:25:19 26 4
gpt4 key购买 nike

我目前正在学习将 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 的路径绝对是路径。但是当我测试这个时,它出现了一个异常(exception):

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)

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

最佳答案

去掉逗号后面的空格:

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

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

关于c# - 在 C# 中使用 fitnesse、fitsharp 和 slim,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10086430/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com