Created
October 21, 2013 19:16
-
-
Save plioi/7089303 to your computer and use it in GitHub Desktop.
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 class ExecuteCases : InstanceBehavior | |
{ | |
public void Execute(Fixture fixture) | |
{ | |
foreach (var @case in fixture.Cases) | |
{ | |
var stopwatch = new Stopwatch(); | |
stopwatch.Start(); | |
try | |
{ | |
fixture.CaseExecutionBehavior.Execute(@case, fixture.Instance); | |
} | |
catch (Exception exception) | |
{ | |
@case.Fail(exception); | |
} | |
stopwatch.Stop(); | |
@case.Duration = stopwatch.Elapsed; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment