-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#23: Added architectural test with Public Api description for Synergy…
….Behaviours.Testing library
- Loading branch information
1 parent
b6dea6c
commit ef67f18
Showing
9 changed files
with
104 additions
and
25 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
7 changes: 7 additions & 0 deletions
7
...urs/Synergy.Behaviours.Tests/Architecture/Debt/Todos.Technical.Debt.verified.md
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Technical Debt for Synergy.Contracts | ||
|
||
Total: 2 | ||
|
||
## [FeatureGenerator.cs](../../../Synergy.Behaviours.Testing/FeatureGenerator.cs) | ||
- TODO: Marcin Celej [from: Marcin Celej on: 10-05-2023]: Add include / exclude as functions | ||
- TODO: Marcin Celej [from: Marcin Celej on: 10-05-2023]: Support Scenario Outline along with Examples |
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
23 changes: 23 additions & 0 deletions
23
Behaviours/Synergy.Behaviours.Tests/Architecture/Public/Api.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Synergy.Behaviours.Testing; | ||
using Synergy.Documentation.Api; | ||
|
||
namespace Synergy.Behaviours.Tests.Architecture.Public; | ||
|
||
[UsesVerify] | ||
public class Api | ||
{ | ||
[Fact] | ||
public async Task Generate() | ||
{ | ||
// ARRANGE | ||
var assembly = typeof(Feature<>).Assembly; | ||
|
||
// ACT | ||
var publicApi = ApiDescription.GenerateFor(assembly); | ||
|
||
// ASSERT | ||
await Verifier.Verify(publicApi, "md") | ||
.UseMethodName("of." + assembly.GetName() | ||
.Name); | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...aviours.Tests/Architecture/Public/Api.of.Synergy.Behaviours.Testing.verified.md
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Synergy.Behaviours.Testing | ||
|
||
## Feature<TFeature> (abstract class) : IFeature | ||
- And() : TFeature? | ||
- Background() : TFeature? | ||
- But() : TFeature? | ||
- Given() : TFeature? | ||
- Moreover() : TFeature? | ||
- Then() : TFeature? | ||
- When() : TFeature? | ||
|
||
## FeatureGenerator (abstract class) | ||
- FeatureGenerator.Generate<TBehaviour>( | ||
feature: TBehaviour?, | ||
from: string, | ||
to: string, | ||
include: String[]? [Nullable, Optional], | ||
exclude: String[]? [Nullable, Optional], | ||
generateAfter: Func<Scenario, bool>? [Nullable, Optional], | ||
callerFilePath: string [CallerFilePath, Optional] | ||
) : void [Extension] | ||
- FeatureGenerator.Generate<TBehaviour>( | ||
featureClass: TBehaviour?, | ||
from: string, | ||
include: String[]? [Nullable, Optional], | ||
exclude: String[]? [Nullable, Optional], | ||
generateAfter: Func<Scenario, bool>? [Nullable, Optional], | ||
callerFilePath: string [CallerFilePath, Optional] | ||
) : string [Extension] | ||
|
||
## IFeature (interface) | ||
|
||
## Scenario (record) : IEquatable<Scenario> | ||
- Method: string { get; } | ||
- Tags: ReadOnlyCollection<string> { get; set; } | ||
- Title: string { get; set; } | ||
- ctor( | ||
Title: string, | ||
Tags: ReadOnlyCollection<string> | ||
) | ||
- IsTagged( | ||
tag: string, | ||
tags: params String[] [ParamArray] | ||
) : bool | ||
|
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
10 changes: 0 additions & 10 deletions
10
Behaviours/Synergy.Behaviours.Tests/Todos/Todos.Technical.Debt.verified.md
This file was deleted.
Oops, something went wrong.