Created
August 11, 2012 01:01
-
-
Save jasondentler/3319624 to your computer and use it in GitHub Desktop.
Integration Testing Part 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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