Skip to content

Instantly share code, notes, and snippets.

@jasondentler
Created August 11, 2012 01:01
Show Gist options
  • Save jasondentler/3319624 to your computer and use it in GitHub Desktop.
Save jasondentler/3319624 to your computer and use it in GitHub Desktop.
Integration Testing Part 1
public void Clear()
{
const string exe = "RunDll32.exe";
const string args = "InetCpl.cpl,ClearMyTracksByProcess 8";
var si = new ProcessStartInfo(exe, args)
{
UseShellExecute = false,
CreateNoWindow = true
};
var process = Process.Start(si);
process.WaitForExit();
}
Feature: Display Widgets
In order to sell widgets
As a widget salesperson
I want to display widgets on my website
@web
Scenario: Empty list of widgets
When I view the widget list
Then the error message is "Sorry. No widgets available."
@web
Scenario: List one widget
Given I have added one widget
When I view the widget list
Then the widget details are displayed
@web
Scenario: List widgets
Given I have added two widgets
When I view the widget list
Then two widgets are listed
using TechTalk.SpecFlow;
namespace Specs.Infrastructure
{
[Binding]
public class WebConfiguration
{
[BeforeTestRun]
public static void BeforeTestRun()
{
// Runs before the first scenario
}
[AfterTestRun]
public static void AfterTestRun()
{
// Runs after the last scenario
}
[BeforeScenario("web")]
public void BeforeScenario()
{
// Runs before each scenario with the @web tag
}
[AfterScenario("web")]
public void AfterScenario()
{
// Runs after each scenario with the @web tag
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment