// StoryQ demo
This is a basic demo of using StoryQ.
You need to implement the void methods with wrappers around the system functionality under test.
Note this uses the Given/When/Then pattern as opposed to the normal NUnit Assemble, Action, Assert.
using System;
using NUnit.Framework;
using StoryQ;
namespace Experiments
{
[TestFixture]
public class FirstTest
{
[Test]
public void SunshinePath()
{
new Story(“User Management”).InOrderTo(“Add User”)
.AsA(“Admin”).IWant(“To Add a User to the system”)
.WithScenario(“HappyPath”)
.Given(IHaveEnteredUserName)
.When(IPressSave)
.Then(UserIsAdded)
.And(IAmReturnedToTheMainWindow)
.WithScenario(“UserExists”)
.Given(IHaveEnteredUserName)
.When(IPressSave)
.And(UserAlreadyExists)
.Then(IAmShownErrorMessage)
.ExecuteWithReport();
}
private void IHaveEnteredUserName()
{
throw new NotImplementedException();
}
private void IPressSave()
{
throw new NotImplementedException();
}
private void UserIsAdded()
{
throw new NotImplementedException();
}
private void IAmReturnedToTheMainWindow()
{
throw new NotImplementedException();
}
private void UserAlreadyExists()
{
throw new NotImplementedException();
}
private void IAmShownErrorMessage()
{
throw new NotImplementedException();
}
}
}