Skip to content

Commit 36b3b5b

Browse files
authored
Update unit-testing-mstest-migration-from-v1-to-v3.md
1 parent 5a66197 commit 36b3b5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/core/testing/unit-testing-mstest-migration-from-v1-to-v3.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ Choose the option that best suits your project setup. Both methods ensure your p
105105
Assert.AreEqual<customObject>(expectedObject, actualObject);
106106
Assert.AreNotEqual<customObject>(expectedObject, actualObject);
107107
```
108+
108109
- **Test Initialization**: Use `TestInitialize` methods for async initialization.
109110
- **Cleanup**: Use `TestCleanup` methods or the `Dispose` pattern for cleanup.
110111
- **RunSettings**: The `.testsettings` file is no longer supported, meaning `<LegacySettings>` is also no longer available. Use [.runsettings](/visualstudio/test/configure-unit-tests-by-using-a-dot-runsettings-file) for test configuration.
@@ -151,6 +152,7 @@ The DataRowAttribute constructors in MSTest v3 have been simplified to enforce t
151152
[DataRow(1, "test")] // Correct: matches parameter types (int, string)
152153
public void MyTestMethod(int number, string text) { ... }
153154
```
155+
154156
In cases where types don’t match exactly, MSTest v3 will now raise an error rather than attempting a conversion.
155157
156158
### Timeout Settings
@@ -179,6 +181,7 @@ public void TestMethod() { ... }
179181
[Timeout(2000)] // Verify this value still works under MSTest v3
180182
public async Task TestMethod() { ... }
181183
```
184+
182185
---
183186
184187
## Configuration Changes

0 commit comments

Comments
 (0)