[英]Using Symbols in FitSharp
I'm trying to use Symbols in my .NET FitNesse fixtures, using the last version of FitSharp (release.1.8.net.40.zip), like this: 我正在尝试使用最新版本的FitSharp(release.1.8.net.40.zip)在.NET FitNesse固定装置中使用符号 ,如下所示:
!|Player Registers |
|username|password|player id?|
|john |test123 |>>player |
The symbol, "player", is ignored: 符号“玩家”将被忽略:
[1] expected [>>player]
[1]预期的[>>播放器]
I tried to load the handlers: 我试图加载处理程序:
!|Cell Handler Loader |
|load|SymbolSaveHandler |FitLibrary|
|load|SymbolRecallHandler|FitLibrary|
But it doesn't seem to work: 但这似乎不起作用:
Could not find class CellHandlerLoader
找不到类CellHandlerLoader
There were some library changes, as described here: http://fitsharp.github.com/Fit/BreakingChanges.html 有一些库更改,如下所述: http : //fitsharp.github.com/Fit/BreakingChanges.html
Any help would be appreciated. 任何帮助,将不胜感激。
Thank you! 谢谢!
Update : 更新 :
My fixture code: 我的灯具代码:
namespace Example.Tests.FitNesse {
public class PlayerRegisters : ColumnFixture {
public string Username;
public string Password;
public int PlayerId() {
return 1;
}
}
}
Suite config file (example.config.xml): 套件配置文件(example.config.xml):
<suiteConfig>
<ApplicationUnderTest>
<AddAssembly>c:\Users\Marcel\Documents\dev\dotnet\Example.Tests.FitNesse\bin\x86\Debug\Example.Tests.FitNesse.dll</AddAssembly>
<AddNamespace>Example.Tests.FitNesse</AddNamespace>
</ApplicationUnderTest>
</suiteConfig>
And FitNesse root page: 和FitNesse根页面:
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {%m -c c:\fitnesse\dotnet\example.config.xml -r fitSharp.Slim.Service.Runner,c:\fitnesse\dotnet\fitsharp.dll}
!define TEST_RUNNER {c:\fitnesse\dotnet\Runner.exe}
I've tried including fit.dll to my assemblies: https://github.com/jediwhale/fitsharp/issues#issue/62 我尝试将fit.dll包含到我的程序集中 : https : //github.com/jediwhale/fitsharp/issues#issue/62
Also tried adding some operators... 还尝试添加一些运算符...
I had this same problem. 我有同样的问题。 The answer is that fitSharp has a different symbol syntax.
答案是fitSharp具有不同的符号语法。
Try this 尝试这个
!|Player Registers |
|username|password|player id?|
|john |test123 |$player= |
Then access the symbol using just $player. 然后仅使用$ player访问该符号。
OK, I've got it! 好,我知道了!
This fixtures work fine in Fit but not in Slim . 这种装置在Fit中可以正常工作,但在Slim中则不能。
Just changed my root page: 刚刚更改了我的根页面:
!path c:\Users\Marcel\Documents\dev\dotnet\Example.Tests.FitNesse\bin\x86\Debug\Example.Tests.FitNesse.dll
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer,c:\fitnesse\dotnet\fit.dll %p}
!define TEST_RUNNER {c:\fitnesse\dotnet\Runner.exe}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.