-
Notifications
You must be signed in to change notification settings - Fork 20
Embedded runner
MorganPersson edited this page Nov 26, 2012
·
1 revision
If you cant use the R# or Visual Studio plugin the EmbeddedRunner is an option you can use. You simply "embed" it in another testing frameowrk, for example nunit.
using NBehave.Narrator.Framework;
using NUnit.Framework;
namespace EmbeddedRunner.Example
{
[TestFixture]
public class EmbeddedRunnerSpec
{
[Test]
public void Should_write_Feature()
{
@"
Feature: x
narrative
Scenario: y
Given a
When b
Then c"
.ExecuteText();
}
}
}
using NBehave.Narrator.Framework;
using NUnit.Framework;
namespace EmbeddedRunner.Example
{
[TestFixture]
public class EmbeddedRunnerSpec
{
[Test]
public void Should_write_Feature()
{
@"xyz.feature".ExecuteFile();
}
}
}