Closed Thaoden closed 8 years ago
Can you post the exact content of the test and the full stack trace of the result?
This is the corresponding test:
!|GenerateUsername|
!define amount {66925}
|check | Generate | ${amount} | Guest User For Guest Host | abc | With Given name | Jadzia | And Surname | Dax | And Email | jadzia.dax@test.mydomain.de| exception[System.IndexOutOfRangeException: "Couldn't create new loginId - giving up"]|
I attached a screenshot of the stacktrace:
Inlining the amount
-variable didn't help.
The exception keyword is looking for the exception type name not the fully-qualified name.
So you need to use this:
|exception[IndexOutOfRangeException: "Couldn't create new loginId - giving up"]|
On 2015-09-07 06:38, Thaoden wrote:
Hi,
I try to catch an exception in my DoFixture:
etc etc etc exception[System.IndexOutOfRangeException: "Couldn't create new loginId - giving up"] When I run the test, it throws the expected exception with a stack trace, but the check fails:
exception[System.IndexOutOfRangeException] expected System.IndexOutOfRangeException: Couldn't create new loginId - giving up at (stack) actual Replacing the exception with an |error| keyword makes the test pass - but I'd like to check on the type and message of the exception too. Any hint what I should change?
Thanks!
— Reply to this email directly or view it on GitHub https://github.com/jediwhale/fitsharp/issues/138.
Cheers, Mike Stockdale
/fit/Sharp http://fitsharp.github.com Syterra Software Inc. http://www.syterra.com
Hi,
I try to catch an exception in my DoFixture:
When I run the test, it throws the expected exception with a stack trace, but the check fails:
Replacing the exception with an
error
keyword makes the test pass - but I'd like to check on the type and message of the exception too. Any hint what I should change?Thanks!