Skip to content

Commit f210d02

Browse files
authored
Update configure-unit-tests-by-using-a-dot-runsettings-file.md
1 parent 14d0291 commit f210d02

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/test/configure-unit-tests-by-using-a-dot-runsettings-file.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,12 @@ The XML configuration should be placed directly into `<RunSettings>` node:
260260
Test run parameters provide a way to define variables and values that are available to the tests at run time. Access the parameters using the MSTest <xref:Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.Properties%2A?displayProperty=nameWithType> property (or the NUnit [TestContext](https://docs.nunit.org/articles/nunit/writing-tests/TestContext.html)):
261261

262262
```csharp
263-
private string _appUrl;
264263
public TestContext TestContext { get; set; }
265264

266265
[TestMethod] // [Test] for NUnit
267266
public void HomePageTest()
268267
{
269-
string _appUrl = TestContext.Properties["webAppUrl"];
268+
string appUrl = TestContext.Properties["webAppUrl"];
270269
}
271270
```
272271

0 commit comments

Comments
 (0)