-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fleshing out Generation System Tests (2) (#99)
* Commit to flesh out Generation System Test. * Added test to verify that async step bindings are executed in the order specified in the Scenario. * Tests that verify that Before/After Hooks are run. * cleanup; promoted some code from GenerationTestBAse to SystemTestBase. * Adjusted the expectations of the Undefined Step test to account for different handling by MSTest. Adjusted Ignored test to disable row tests; this provides for consistent handling by all three test frameworks. * fix build * code cleanup * refactor common scenarios * Improve hook / step assertions * Merge outcome related tests * Fixes Adding @ignore to an Examples block generates invalid code for NUnit v3+ issue (#103) * Add fix to CHANGELOG * cleanup * Test scenario outlines (nr of examples, params are available in ScenarioContext, examples tags) * Add portability tests for before/after test run hooks (.NET Framework version of Reqnroll is subscribed to assembly unload) --------- Co-authored-by: Chris Rudolphi <[email protected]>
- Loading branch information
1 parent
791b0c5
commit 77bea54
Showing
37 changed files
with
644 additions
and
137 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
1 change: 0 additions & 1 deletion
1
...oll.TestProjectGenerator/Reqnroll.TestProjectGenerator.Tests/FeatureFileGeneratorTests.cs
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
Reqnroll.TestProjectGenerator/Reqnroll.TestProjectGenerator/Data/AppConfigSection.cs
This file contains 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
This file contains 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
28 changes: 22 additions & 6 deletions
28
Reqnroll.TestProjectGenerator/Reqnroll.TestProjectGenerator/Data/SolutionFile.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
using System; | ||
|
||
namespace Reqnroll.TestProjectGenerator.Data | ||
{ | ||
public class SolutionFile | ||
public class SolutionFile(string path, string content) | ||
{ | ||
public SolutionFile(string path, string content) | ||
private bool _isFrozen = false; | ||
|
||
public string Path { get; } = path; //relative from project | ||
public string Content { get; private set; } = content; | ||
|
||
internal void Freeze() | ||
{ | ||
Path = path; | ||
Content = content; | ||
_isFrozen = true; | ||
} | ||
|
||
public string Path { get; } //relative from project | ||
public string Content { get; } | ||
public void Append(string addedContent) | ||
{ | ||
if (_isFrozen) | ||
{ | ||
throw new InvalidOperationException("Cannot append to frozen file"); | ||
} | ||
|
||
if (!Content.EndsWith(Environment.NewLine)) | ||
Content += Environment.NewLine; | ||
|
||
Content += addedContent; | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.