Skip to content

Commit 7107c99

Browse files
Fix indentation in generated step definition classes (#144)
* Initial plan * Fix indentation in generated step definition classes Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> * Complete indentation fix - all checks passed Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> * Remove accidentally committed nuget.exe binary Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
1 parent b4438cc commit 7107c99

6 files changed

+10
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,3 +271,4 @@ launchSettings.json
271271

272272
/Tests/ExternalPackages/Reqnroll*.nupkg
273273
/.ncrunch/cache/
274+
.nuget/nuget.exe

Reqnroll.VisualStudio/Editor/Commands/DefineStepsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ internal static string GenerateStepDefinitionClass(
212212
template.AppendLine($"{classIndent}[Binding]");
213213
template.AppendLine($"{classIndent}public class {className}");
214214
template.AppendLine($"{classIndent}{{");
215-
template.Append(adjustedSnippet);
215+
template.AppendLine(adjustedSnippet);
216216
template.AppendLine($"{classIndent}}}");
217217

218218
// Close namespace if block-scoped

Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_BlockScoped.approved.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ namespace MyNamespace.MyProject
1010
public void WhenIPressAdd()
1111
{
1212
throw new PendingStepException();
13-
} }
13+
}
14+
}
1415
}

Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.Reqnroll_FileScoped.approved.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ public class Feature1StepDefinitions
1010
public void WhenIPressAdd()
1111
{
1212
throw new PendingStepException();
13-
}}
13+
}
14+
}

Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_BlockScoped.approved.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ namespace MyNamespace.MyProject
1010
public void WhenIPressAdd()
1111
{
1212
throw new PendingStepException();
13-
} }
13+
}
14+
}
1415
}

Tests/Reqnroll.VisualStudio.Tests/Editor/ApprovalTestData/DefineStepsCommandTests.GenerateStepDefinitionClass.ForScenario.SpecFlow_FileScoped.approved.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ public class Feature1StepDefinitions
1010
public void WhenIPressAdd()
1111
{
1212
throw new PendingStepException();
13-
}}
13+
}
14+
}

0 commit comments

Comments
 (0)