"Could not interpret" on StorEvil example test

4 views
Skip to first unread message

Anthony Stevens

unread,
Aug 5, 2010, 2:41:06 PM8/5/10
to StorEvil
Hi -

Installed and configured StorEvil 0.5 as per the wiki. Aside from
missing a step (you need to add a reference to the StorEvil.Assertions
library to get the ShouldBe() extension method), everything went fine.

But, when executing storevil execute from the .csproj directory, I get
several "could not interpret" output messages, including in the first
"Example passing scenario" test:

SCENARIO: Example passing scenario
Given some condition
When I take an action
Then the state should be valid -- Could not interpret
// Then the state should be valid
public void Then_the_state_should_be_valid()
{
StorEvil.ScenarioStatus.Pending();
}

The code in the ExampleContext.cs indicates that the phrase "Then the
state should be valid" should be correct and will pick up the related
extension method:

// StorEvil can use this, along with its "ShouldBe" extension method,
// to interpret "Then the result should be XXXXXX"
public string Then_the_state()
{
return "valid";
}

I'm a little stumped. Any help is appreciated!

David Foley

unread,
Aug 5, 2010, 3:13:28 PM8/5/10
to stor...@googlegroups.com
Hi Anthony.

Can you try running storevil execute --debug ?
It will output a ton of information that might help.

Anthony Stevens

unread,
Aug 5, 2010, 3:43:57 PM8/5/10
to StorEvil
Yeah, that's pretty cool. Here's the output for the relevant section:

[ScenarioLineExecter.ExecuteLine] - Then the state should be valid
[Interpreting] - Then the state should be valid
[ScenarioInterpreterForType] - Interpreting 'Then the state should be
valid' with type:ExampleContext
[ScenarioInterpreterForType] - Partial match -Then the state
[ScenarioInterpreterForType] - Building interpreter for: System.String
[ScenarioInterpreterForType] - Added reflection matcher: get_Chars
[ScenarioInterpreterForType] - Added reflection matcher: CopyTo
[ScenarioInterpreterForType] - Added reflection matcher: ToCharArray
[ScenarioInterpreterForType] - Added reflection matcher: ToCharArray
[ScenarioInterpreterForType] - Added reflection matcher: get_Length
[ScenarioInterpreterForType] - Added reflection matcher: Split
[ScenarioInterpreterForType] - Added reflection matcher: Split
[ScenarioInterpreterForType] - Added reflection matcher: Split
[ScenarioInterpreterForType] - Added reflection matcher: Split
[ScenarioInterpreterForType] - Added reflection matcher: Split
[ScenarioInterpreterForType] - Added reflection matcher: Split
[ScenarioInterpreterForType] - Added reflection matcher: Substring
[ScenarioInterpreterForType] - Added reflection matcher: Substring
[ScenarioInterpreterForType] - Added reflection matcher: Trim
[ScenarioInterpreterForType] - Added reflection matcher: TrimStart
[ScenarioInterpreterForType] - Added reflection matcher: TrimEnd
[ScenarioInterpreterForType] - Added reflection matcher: IsNormalized
[ScenarioInterpreterForType] - Added reflection matcher: IsNormalized
[ScenarioInterpreterForType] - Added reflection matcher: Normalize
[ScenarioInterpreterForType] - Added reflection matcher: Normalize
[ScenarioInterpreterForType] - Added reflection matcher: Contains
[ScenarioInterpreterForType] - Added reflection matcher: EndsWith
[ScenarioInterpreterForType] - Added reflection matcher: EndsWith
[ScenarioInterpreterForType] - Added reflection matcher: EndsWith
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOfAny
[ScenarioInterpreterForType] - Added reflection matcher: IndexOfAny
[ScenarioInterpreterForType] - Added reflection matcher: IndexOfAny
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: IndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher:
LastIndexOfAny
[ScenarioInterpreterForType] - Added reflection matcher:
LastIndexOfAny
[ScenarioInterpreterForType] - Added reflection matcher:
LastIndexOfAny
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: LastIndexOf
[ScenarioInterpreterForType] - Added reflection matcher: PadLeft
[ScenarioInterpreterForType] - Added reflection matcher: PadLeft
[ScenarioInterpreterForType] - Added reflection matcher: PadRight
[ScenarioInterpreterForType] - Added reflection matcher: PadRight
[ScenarioInterpreterForType] - Added reflection matcher: StartsWith
[ScenarioInterpreterForType] - Added reflection matcher: StartsWith
[ScenarioInterpreterForType] - Added reflection matcher: StartsWith
[ScenarioInterpreterForType] - Added reflection matcher: ToLower
[ScenarioInterpreterForType] - Added reflection matcher: ToLower
[ScenarioInterpreterForType] - Added reflection matcher:
ToLowerInvariant
[ScenarioInterpreterForType] - Added reflection matcher: ToUpper
[ScenarioInterpreterForType] - Added reflection matcher: ToUpper
[ScenarioInterpreterForType] - Added reflection matcher:
ToUpperInvariant
[ScenarioInterpreterForType] - Added reflection matcher: Clone
[ScenarioInterpreterForType] - Added reflection matcher: Trim
[ScenarioInterpreterForType] - Added reflection matcher: Insert
[ScenarioInterpreterForType] - Added reflection matcher: Replace
[ScenarioInterpreterForType] - Added reflection matcher: Replace
[ScenarioInterpreterForType] - Added reflection matcher: Remove
[ScenarioInterpreterForType] - Added reflection matcher: Remove
[ScenarioInterpreterForType] - Added reflection matcher: GetEnumerator
[ScenarioInterpreterForType] - Added reflection matcher: Chars
[ScenarioInterpreterForType] - Added reflection matcher: Length
[ScenarioInterpreterForType] - Interpreting 'should be valid' with
type:String
[ScenarioInterpreterForType] - Interpreting 'Then the state should be
valid' with type:Object
[ScenarioInterpreter] - no match: Then the state should be valid
Then the state should be valid -- Could not interpret
// Then the state should be valid
public void Then_the_state_should_be_valid()
{
StorEvil.ScenarioStatus.Pending();
}

David Foley

unread,
Aug 5, 2010, 4:53:26 PM8/5/10
to stor...@googlegroups.com
Hmmm... it looks like it is not finding the ShouldBe extension method from StorEvil.Assertions.DLL.

Does the assemblies setting in storevil.config point to that file?

And does that DLL exist in the output folder? (commonly bin\debug)


On Aug 5, 2010, at 12:43 PM, Anthony Stevens wrote:

> Yeah, that's pretty cool. Here's the output for the relevant section:
>

Anthony Stevens

unread,
Aug 5, 2010, 6:27:45 PM8/5/10
to StorEvil
Yes! That was it. I added the path to \bin\Debug
\StorEvil.Assertions.dll to my storevil.config file and now it works.

Thanks!

a
Reply all
Reply to author
Forward
0 new messages