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

Empty root namespace #1606

Merged
merged 2 commits into from Jun 7, 2019
Merged

Conversation

idg10
Copy link
Contributor

@idg10 idg10 commented Jun 6, 2019

  • Remove [Required] from build task RootNamespace
  • Take folder paths into account when root namespace absent
  • Add tests for previously supported and new scenarois

This fixes #1605

It also makes the behaviour in empty-root-namespace scenarios more consistent with when the root namespace is specified. Back when empty root namespaces worked (which they did if you used the custom tool to generate codebehind) the folder path to the class wasn't taken into account like it is in non-empty cases. You just ended up with the same default namespace for everything. With this change, files in subfolders go in namespaces based on that file structure, exactly like they do when the root namespace is non-empty, and exactly as happens when you ask VS to add a new file to a subfolder (whether or not the root namespace is empty).

Types of changes

  • 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).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added an entry to the changelog

idg10 and others added 2 commits June 6, 2019 10:01
 * Remove [Required] from build task RootNamespace
 * Take folder paths into account when root namespace absent
 * Add tests for previously supported and new scenarois
@SabotageAndi
Copy link
Contributor

Thanks for your contribution to SpecFlow. If you would like us to send you some SpecFlow stickers as a thank you, please fill out the form here.

@SabotageAndi SabotageAndi merged commit 9a63f59 into SpecFlowOSS:master Jun 7, 2019
idg10 added a commit to idg10/SpecFlow that referenced this pull request Jan 8, 2020
* Enable empty root namespace

 * Remove [Required] from build task RootNamespace
 * Take folder paths into account when root namespace absent
 * Add tests for previously supported and new scenarois

* Add changelog entry for root namespace fix
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.

Feature File Codebehind MSBuild Task Doesn't Handle Blank RootNamespace
2 participants