Skip to content

Commit

Permalink
Update tests for Reqnroll v2
Browse files Browse the repository at this point in the history
  • Loading branch information
gasparnagy committed Jun 5, 2024
1 parent 0e9abcc commit f311531
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 27 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Tests/ExternalPackages/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Reqnroll" Version="1.0.0" />
<PackageReference Include="Reqnroll" Version="2.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions Tests/ExternalPackages/PackagesForTests/packages.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Reqnroll" version="1.0.0" />
<package id="Reqnroll.MsTest" version="1.0.0" />
<package id="Reqnroll.NUnit" version="1.0.0" />
<package id="Reqnroll.xUnit" version="1.0.0" />
<package id="Reqnroll.Tools.MsBuild.Generation" version="1.0.0" />
<package id="Reqnroll" version="2.0.2" />
<package id="Reqnroll.MsTest" version="2.0.2" />
<package id="Reqnroll.NUnit" version="2.0.2" />
<package id="Reqnroll.xUnit" version="2.0.2" />
<package id="Reqnroll.Tools.MsBuild.Generation" version="2.0.2" />
<package id="nunit" version="3.14.0" />
<package id="NUnit3TestAdapter" version="4.5.0" />
<package id="xunit" version="2.6.6" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ Scenario Outline: Discover bindings from a Reqnroll project on .NET Framework
Then the discovery succeeds with several step definitions
And the step definitions contain source file and line
Examples:
| case | version |
| line-v1.0 | v1.0.0 |
| case | version |
| line-v1 | v1.0.1 |
| line-v2 | v2.0.2 |

Scenario Outline: Discover bindings from a Reqnroll project on .NET Core
Given there is a simple Reqnroll project for <version>
Expand All @@ -18,8 +19,9 @@ Scenario Outline: Discover bindings from a Reqnroll project on .NET Core
When the binding discovery performed
Then the discovery succeeds with several step definitions
Examples:
| case | version |
| line-v1.0 | v1.0.0 |
| case | version |
| line-v1 | v1.0.1 |
| line-v2 | v2.0.2 |

Scenario Outline: Discover bindings from Reqnroll using different test runners
Given there is a simple Reqnroll project with test runner "<test runner tool>" for the latest version
Expand All @@ -32,16 +34,3 @@ Examples:
| NUnit |
| xUnit |
| MsTest |

Scenario Outline: Discover bindings with the right Reqnroll connector
Given there is a simple Reqnroll project for <version>
And the project uses the new project format
And the target framework is <framework>
And the project is built
When the binding discovery performed
Then the discovery succeeds with several step definitions
Examples:
| case | version | framework |
| G-net8.0 | v1.0.0 | net8.0 |
| G-net7.0 | v1.0.0 | net7.0 |
| G-net6.0 | v1.0.0 | net6.0 |
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void GivenThereIsASmallReqnrollProjectWithExternalBindings()
GivenThereIsASmallReqnrollProject();
_generatorOptions.AddExternalBindingPackage = true;
_generatorOptions.ExternalBindingPackageName =
$"Deveroom.SampleReqnroll{DomainDefaults.LatestReqnrollVersion.ToShortVersionString()}.ExternalBindings";
$"Deveroom.SampleReqnrollV{DomainDefaults.LatestReqnrollVersion.Version.Major}.ExternalBindings";
}

[Given(@"there is a small Reqnroll project with async bindings")]
Expand All @@ -101,7 +101,7 @@ public void GivenThereIsASimpleReqnrollProjectWithPluginForVersion(NuGetVersion
ReqnrollPackageVersion = reqnrollVersion.ToString(),
AddGeneratorPlugin = true,
AddRuntimePlugin = true,
PluginName = $"Deveroom.SampleReqnroll{reqnrollVersion.ToShortVersionString()}.ReqnrollPlugin"
PluginName = $"Deveroom.SampleReqnrollV{reqnrollVersion.Version.Major}.ReqnrollPlugin"
};
}

Expand All @@ -114,7 +114,7 @@ public void GivenThereIsASimpleReqnrollProjectWithExternalBindingsForVersion(NuG
ReqnrollPackageVersion = reqnrollVersion.ToString(),
AddExternalBindingPackage = true,
ExternalBindingPackageName =
$"Deveroom.SampleReqnroll{reqnrollVersion.ToShortVersionString()}.ExternalBindings"
$"Deveroom.SampleReqnrollV{reqnrollVersion.Version.Major}.ExternalBindings"
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ public static class DomainDefaults
//TODO: calculate latest versions automatically
public static NuGetVersion LatestSpecFlowV2Version = new("2.4.1", "2.4.1");
public static NuGetVersion LatestSpecFlowV3Version = new("3.6.23", "3.6.23");
public static NuGetVersion LatestReqnrollVersion = new("1.0.0", "1.0.0");
public static NuGetVersion LatestReqnrollVersion = new("2.0.2", "2.0.2");
}

0 comments on commit f311531

Please sign in to comment.