Skip to content

Instantly share code, notes, and snippets.

@onefloridacoder
Created May 2, 2011 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onefloridacoder/952546 to your computer and use it in GitHub Desktop.
Save onefloridacoder/952546 to your computer and use it in GitHub Desktop.
Samples to illustrate the SpecFlow .feature file drives the stubbed out (.cs) definition file.
Feature: Registration
In order to have lots of attendees, speakers, and volunteers
As code camp organizer
I want to be able to register many different types of attendees.
Scenario: Register a new attendee with an email address
Given I am not a registered code camp attendee
When I enter and save my profile information
Then I become a registered code camp attendee
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TechTalk.SpecFlow;
namespace Barcamp.Specflow.Tests
{
[Binding]
public class RegistrationDefinitions
{
[Given(@"I am not a registered code camp attendee")]
public void GivenIAmNotARegisteredCodeCampAttendee()
{
//TODO OFC - Write code to check for missing profile.
}
[When(@"I enter and save my profile information")]
public void WhenIEnterAndSaveMyProfileInformation()
{
//TODO - OFC - Write code to save my profile information
}
[Then(@"I become a registered code camp attendee")]
public void ThenIBecomeARegisteredCodeCampAttendee()
{
//TODO OFC - Write code to verify profile exists
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment