Establishing project outline properly by adding necessary files
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.feature.cs
|
||||
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
|
||||
<PackageReference Include="Reqnroll.NUnit" Version="3.0.1"/>
|
||||
<PackageReference Include="nunit" Version="4.0.1"/>
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0"/>
|
||||
<PackageReference Include="FluentAssertions" Version="6.12.0"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,10 @@
|
||||
Feature: Calculator
|
||||
|
||||
Simple calculator for adding two numbers
|
||||
|
||||
@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
|
||||
@@ -0,0 +1,45 @@
|
||||
using Reqnroll;
|
||||
|
||||
namespace EoM_Redux.Tests.StepDefinitions;
|
||||
|
||||
[Binding]
|
||||
public sealed class CalculatorStepDefinitions
|
||||
{
|
||||
// For additional details on Reqnroll step definitions see https://go.reqnroll.net/doc-stepdef
|
||||
|
||||
[Given("the first number is {int}")]
|
||||
public void GivenTheFirstNumberIs(int number)
|
||||
{
|
||||
//TODO: implement arrange (precondition) logic
|
||||
// For storing and retrieving scenario-specific data see https://go.reqnroll.net/doc-sharingdata
|
||||
// To use the multiline text or the table argument of the scenario,
|
||||
// additional string/DataTable parameters can be defined on the step definition
|
||||
// method.
|
||||
|
||||
throw new PendingStepException();
|
||||
}
|
||||
|
||||
[Given("the second number is {int}")]
|
||||
public void GivenTheSecondNumberIs(int number)
|
||||
{
|
||||
//TODO: implement arrange (precondition) logic
|
||||
|
||||
throw new PendingStepException();
|
||||
}
|
||||
|
||||
[When("the two numbers are added")]
|
||||
public void WhenTheTwoNumbersAreAdded()
|
||||
{
|
||||
//TODO: implement act (action) logic
|
||||
|
||||
throw new PendingStepException();
|
||||
}
|
||||
|
||||
[Then("the result should be {int}")]
|
||||
public void ThenTheResultShouldBe(int result)
|
||||
{
|
||||
//TODO: implement assert (verification) logic
|
||||
|
||||
throw new PendingStepException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user