added gerken

This commit is contained in:
2023-01-04 16:50:03 -07:00
parent 55cd8162ed
commit c8175971b7
10 changed files with 129 additions and 1 deletions

5
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"recommendations": [
"alexkrechik.cucumberautocomplete"
]
}

6
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,6 @@
{
"cucumberautocomplete.steps": [
"./Management.Gherkin/**/*.cs"
]
}

1
Management.Gherkin/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.feature.cs

View File

@@ -0,0 +1,9 @@
using System;
namespace Management.Gherkin.Drivers
{
public class Driver
{
}
}

View File

@@ -0,0 +1,13 @@
Feature: Calculator
![Calculator](https://specflow.org/wp-content/uploads/2020/09/calculator.png)
Simple calculator for adding **two** numbers
Link to a feature: [Calculator]($projectname$/Features/Calculator.feature)
***Further read***: **[Learn more about how to generate Living Documentation](https://docs.specflow.org/projects/specflow-livingdoc/en/latest/LivingDocGenerator/Generating-Documentation.html)**
@mytag
Scenario: Add two numbers
Given the first number is 50
And the second number is 70
When the two numbers are added
Then the result should be 120

View File

@@ -0,0 +1,11 @@
using System;
using TechTalk.SpecFlow;
namespace Management.Gherkin.Hooks
{
[Binding]
public class Hooks
{
}
}

View File

@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.*" />
<PackageReference Include="SpecFlow.NUnit" Version="3.9.74" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,58 @@
using TechTalk.SpecFlow;
namespace Management.Gherkin.Steps
{
[Binding]
public sealed class CalculatorStepDefinitions
{
// For additional details on SpecFlow step definitions see https://go.specflow.org/doc-stepdef
private readonly ScenarioContext _scenarioContext;
public CalculatorStepDefinitions(ScenarioContext scenarioContext)
{
_scenarioContext = scenarioContext;
}
[Given("the first number is (.*)")]
public void GivenTheFirstNumberIs(int number)
{
//TODO: implement arrange (precondition) logic
// For storing and retrieving scenario-specific data see https://go.specflow.org/doc-sharingdata
// To use the multiline text or the table argument of the scenario,
// additional string/Table parameters can be defined on the step definition
// method.
_scenarioContext.Pending();
}
[Given("the second number is (.*)")]
public void GivenTheSecondNumberIs(int number)
{
//TODO: implement arrange (precondition) logic
// For storing and retrieving scenario-specific data see https://go.specflow.org/doc-sharingdata
// To use the multiline text or the table argument of the scenario,
// additional string/Table parameters can be defined on the step definition
// method.
_scenarioContext.Pending();
}
[When("the two numbers are added")]
public void WhenTheTwoNumbersAreAdded()
{
//TODO: implement act (action) logic
_scenarioContext.Pending();
}
[Then("the result should be (.*)")]
public void ThenTheResultShouldBe(int result)
{
//TODO: implement assert (verification) logic
_scenarioContext.Pending();
}
}
}

View File

@@ -0,0 +1,4 @@
public class CalendarMonth
{
}

View File

@@ -1 +1,6 @@
# canvasManagement # canvasManagement
install specflow template `dotnet new install Specflow.Templates.DotNet`
view templates with `dotnet new -l`