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:
!|Player Registers |
|username|password|player id?|
|john |test123 |>>player |
The symbol, "player", is ignored:
[1] expected [>>player]
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
There were some library changes, as described here: http://fitsharp.github.com/Fit/BreakingChanges.html
Any help would be appreciated.
Thank you!
Update:
My fix开发者_如何学Pythonture 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):
<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:
!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
Also tried adding some operators...
I had this same problem. The answer is that fitSharp has a different symbol syntax.
Try this
!|Player Registers |
|username|password|player id?|
|john |test123 |$player= |
Then access the symbol using just $player.
OK, I've got it!
This fixtures work fine in Fit but not in 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}
精彩评论