SpecFlowOSS / SpecFlow.VS

The next version of the Visual Studio extension for SpecFlow
MIT License
36 stars 10 forks source link

Add new table will update all .cs files with new variable names #130

Open FinnKjar opened 1 year ago

FinnKjar commented 1 year ago

Used Visual Studio

Visual Studio 2022

Are the latest Visual Studio updates installed?

Yes

SpecFlow Section in app.config or content of specflow.json

No response

Issue Description

In my SpecFlow test I use many tables, and when I add a new test with a table, then all the generated .cs files are updated, because an auto-generated variable name is used like this. Example:

Before adding a new table:

TechTalk.SpecFlow.Table table144 = new TechTalk.SpecFlow.Table(new string[] { . . .

After adding a new table:

TechTalk.SpecFlow.Table table145 = new TechTalk.SpecFlow.Table(new string[] { . . .

I so no reason to have a number included in the variable name, 'table' should be OK.

Steps to Reproduce

Link to Repository Project

No response