Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce and use TagHelper in UnitTestGeneration #2410

Merged

Conversation

bollhals
Copy link
Contributor

Types of changes

Changes in a generated unit test (1. Image old, 2nd is new)

  • featureTags to be static
    image
    image

  • in FeatureSetup to pass said featureTags directly instead of creating a new array
    image
    image

  • all instance methods to be non virtual
    image
    image

  • to call TagHelper instead of individual LINQ
    image
    image

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Performance improvement
  • Refactoring (so no functional change)
  • Other (docs, build config, etc)

Checklist:

  • I've added tests for my code. (most of the time mandatory)
  • [] I have added an entry to the changelog. (mandatory)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@@ -0,0 +1,31 @@
namespace TechTalk.SpecFlow
{
#nullable enable
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: enabled nullable reference types for this file


for (int i = 0; i < tags.Length; i++)
{
if (string.Equals(tags[i], "ignored", System.StringComparison.OrdinalIgnoreCase))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using OrdinalIgnoreCase here

/// <summary>
/// Provides helper methods around tags.
/// </summary>
public static class TagHelper
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention is to extend this helper with other methods like Combine(scenariotags, featuretags), CombineDistinct(scenariotags, featuretags), ...

@bollhals
Copy link
Contributor Author

@SabotageAndi Could you share the path forward with the open PR like this one? Thanks

@SabotageAndi
Copy link
Contributor

WTH, how did this PR passed me? It's from April.
Sorry for that.
I will try to have a look at it in this week. As it is not really a PR for only performance fixes (where we would need #2419), I see no stopper right now.

@SabotageAndi
Copy link
Contributor

Looks good @bollhals. Could you add a changelog entry? Then I will merge it.

@bollhals
Copy link
Contributor Author

bollhals commented Oct 7, 2021

Looks good @bollhals. Could you add a changelog entry? Then I will merge it.

Friendly ping

@SabotageAndi
Copy link
Contributor

@bollhals there was a problem with tests in a pipeline. I restarted the pipeline now. Lets see if it is working now.

@bollhals
Copy link
Contributor Author

👍🏼 looks like it worked

@bollhals
Copy link
Contributor Author

bollhals commented Nov 8, 2021

Friendly reminder @SabotageAndi

@bollhals
Copy link
Contributor Author

reminder

@bollhals
Copy link
Contributor Author

@SabotageAndi This is still open =)

@SabotageAndi SabotageAndi merged commit 920212a into SpecFlowOSS:master Mar 1, 2022
@SabotageAndi
Copy link
Contributor

Sorry for the delay. 😞

@SabotageAndi
Copy link
Contributor

Thanks for your contribution to SpecFlow.
Please submit your contributions to our SpecFlow Community Heroes program at https://specflow.org/community/submit-a-contribution/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants