diff --git a/.gitignore b/.gitignore index edf6abae..81400c10 100644 --- a/.gitignore +++ b/.gitignore @@ -271,3 +271,4 @@ launchSettings.json /Tests/ExternalPackages/Reqnroll*.nupkg /.ncrunch/cache/ +.nuget/nuget.exe diff --git a/Reqnroll.VisualStudio/Editor/Commands/DefineStepsCommand.cs b/Reqnroll.VisualStudio/Editor/Commands/DefineStepsCommand.cs index 07c2197f..9e7b8655 100644 --- a/Reqnroll.VisualStudio/Editor/Commands/DefineStepsCommand.cs +++ b/Reqnroll.VisualStudio/Editor/Commands/DefineStepsCommand.cs @@ -212,7 +212,7 @@ internal static string GenerateStepDefinitionClass( template.AppendLine($"{classIndent}[Binding]"); template.AppendLine($"{classIndent}public class {className}"); template.AppendLine($"{classIndent}{{"); - template.Append(adjustedSnippet); + template.AppendLine(adjustedSnippet); template.AppendLine($"{classIndent}}}"); // Close namespace if block-scoped diff --git a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_BlockScoped.approved.txt b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_BlockScoped.approved.txt index 49045d6b..e49d0e45 100644 --- a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_BlockScoped.approved.txt +++ b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_BlockScoped.approved.txt @@ -10,5 +10,6 @@ namespace MyNamespace.MyProject public void WhenIPressAdd() { throw new PendingStepException(); - } } + } + } } diff --git a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_FileScoped.approved.txt b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_FileScoped.approved.txt index 00b17034..5317920a 100644 --- a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_FileScoped.approved.txt +++ b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_FileScoped.approved.txt @@ -10,4 +10,5 @@ public class Feature1StepDefinitions public void WhenIPressAdd() { throw new PendingStepException(); - }} + } +} diff --git a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_BlockScoped.approved.txt b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_BlockScoped.approved.txt index 85763f04..426c1745 100644 --- a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_BlockScoped.approved.txt +++ b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_BlockScoped.approved.txt @@ -10,5 +10,6 @@ namespace MyNamespace.MyProject public void WhenIPressAdd() { throw new PendingStepException(); - } } + } + } } diff --git a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_FileScoped.approved.txt b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_FileScoped.approved.txt index 010f9d6c..6420a851 100644 --- a/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_FileScoped.approved.txt +++ b/Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_FileScoped.approved.txt @@ -10,4 +10,5 @@ public class Feature1StepDefinitions public void WhenIPressAdd() { throw new PendingStepException(); - }} + } +}