PageRenderTime 1008ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/Tests/TechTalk.SpecFlow.Specs/StepDefinitions/ProjectSteps.cs

http://github.com/techtalk/SpecFlow
C# | 62 lines | 51 code | 11 blank | 0 comment | 0 complexity | 946e6bcc4590fb28745e8e79e4f0f4da MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0
  1. using TechTalk.SpecFlow.TestProjectGenerator.Driver;
  2. namespace TechTalk.SpecFlow.Specs.StepDefinitions
  3. {
  4. [Binding]
  5. public class ProjectSteps
  6. {
  7. private readonly ProjectsDriver _projectsDriver;
  8. private readonly CompilationDriver _compilationDriver;
  9. private readonly CompilationResultDriver _compilationResultDriver;
  10. public ProjectSteps(ProjectsDriver projectsDriver, CompilationDriver compilationDriver, CompilationResultDriver compilationResultDriver)
  11. {
  12. _projectsDriver = projectsDriver;
  13. _compilationDriver = compilationDriver;
  14. _compilationResultDriver = compilationResultDriver;
  15. }
  16. [Given(@"there is a SpecFlow project")]
  17. public void GivenThereIsASpecFlowProject()
  18. {
  19. _projectsDriver.CreateSpecFlowProject("C#");
  20. }
  21. [Given(@"it is using SpecFlow\.Tools\.MSBuild\.Generator")]
  22. public void GivenItIsUsingSpecFlow_Tools_MSBuild_Generator()
  23. {
  24. }
  25. [Given(@"parallel execution is enabled")]
  26. public void GivenParallelExecutionIsEnabled()
  27. {
  28. _projectsDriver.EnableTestParallelExecution();
  29. }
  30. [Given(@"I have a '(.*)' test project")]
  31. public void GivenIHaveATestProject(string language)
  32. {
  33. _projectsDriver.CreateProject(language);
  34. }
  35. [When(@"I compile the solution")]
  36. public void WhenTheProjectIsCompiled()
  37. {
  38. _compilationDriver.CompileSolution();
  39. }
  40. [Then(@"no compilation errors are reported")]
  41. public void ThenNoCompilationErrorsAreReported()
  42. {
  43. _compilationResultDriver.CheckSolutionShouldHaveCompiled();
  44. }
  45. [Then(@"is a compilation error")]
  46. public void ThenIsACompilationError()
  47. {
  48. _compilationResultDriver.CheckSolutionShouldHaveCompileError();
  49. }
  50. }
  51. }