@@ -7,7 +7,7 @@ namespace Hyperbee.Expressions.Tests;
77[ TestClass ]
88public class BlockAsyncSwitchTests
99{
10- [ DataTestMethod ]
10+ [ TestMethod ]
1111 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
1212 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
1313 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
@@ -39,7 +39,7 @@ public async Task AsyncBlock_ShouldAwaitSuccessfully_WithAwaitInSwitchValue( Com
3939 Assert . AreEqual ( 10 , result ) ; // Awaited switch value should match the first case
4040 }
4141
42- [ DataTestMethod ]
42+ [ TestMethod ]
4343 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
4444 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
4545 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
@@ -71,7 +71,7 @@ public async Task AsyncBlock_ShouldAwaitSuccessfully_WithAwaitInDefaultBody( Com
7171 Assert . AreEqual ( 99 , result ) ; // Default body should return 99
7272 }
7373
74- [ DataTestMethod ]
74+ [ TestMethod ]
7575 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
7676 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
7777 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
@@ -106,7 +106,7 @@ public async Task AsyncBlock_ShouldAwaitSuccessfully_WithAwaitInSwitchCaseBody(
106106 Assert . AreEqual ( 100 , result ) ; // Case 1 body should be awaited and return 100
107107 }
108108
109- [ DataTestMethod ]
109+ [ TestMethod ]
110110 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
111111 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
112112 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
@@ -141,7 +141,7 @@ public async Task AsyncBlock_ShouldAwaitSuccessfully_WithAwaitInSwitchValueAndCa
141141 Assert . AreEqual ( 50 , result ) ; // Case 2 body should be awaited and return 50
142142 }
143143
144- [ DataTestMethod ]
144+ [ TestMethod ]
145145 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
146146 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
147147 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
@@ -182,14 +182,13 @@ public async Task AsyncBlock_ShouldAwaitSuccessfully_WithNestedSwitchesAndAwaits
182182 Assert . AreEqual ( 30 , result ) ; // First case of nested switch should return 30
183183 }
184184
185- [ DataTestMethod ]
185+ [ TestMethod ]
186186 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
187187 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
188188 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
189189 [ DataRow ( CompleterType . Deferred , CompilerType . Fast ) ]
190190 [ DataRow ( CompleterType . Deferred , CompilerType . System ) ]
191191 [ DataRow ( CompleterType . Deferred , CompilerType . Interpret ) ]
192- [ ExpectedException ( typeof ( ArgumentException ) ) ]
193192 public async Task AsyncBlock_ShouldThrowException_WithAwaitInSwitchCaseTestValues ( CompleterType completer , CompilerType compiler )
194193 {
195194 // Arrange: Switch case test values cannot contain awaited tasks
@@ -211,10 +210,10 @@ public async Task AsyncBlock_ShouldThrowException_WithAwaitInSwitchCaseTestValue
211210 var compiledLambda = lambda . Compile ( compiler ) ;
212211
213212 // Act
214- await compiledLambda ( ) ;
213+ await Assert . ThrowsExactlyAsync < ArgumentException > ( async ( ) => await compiledLambda ( ) ) ;
215214 }
216215
217- [ DataTestMethod ]
216+ [ TestMethod ]
218217 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
219218 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
220219 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
@@ -249,7 +248,7 @@ public async Task AsyncBlock_ShouldUseAwaitedValue_WithComplexExpressionInSwitch
249248 Assert . AreEqual ( 10 , result ) ; // Matching case with complex awaited value should return 10
250249 }
251250
252- [ DataTestMethod ]
251+ [ TestMethod ]
253252 [ DataRow ( CompilerType . Fast ) ]
254253 [ DataRow ( CompilerType . System ) ]
255254 [ DataRow ( CompilerType . Interpret ) ]
@@ -276,7 +275,7 @@ public async Task AsyncBlock_ShouldHandleTaskDelaySuccessfully_InSwitchCase( Com
276275 Assert . AreEqual ( 100 , result ) ; // Awaiting a delayed task should return 100 after completion
277276 }
278277
279- [ DataTestMethod ]
278+ [ TestMethod ]
280279 [ DataRow ( CompleterType . Immediate , CompilerType . Fast ) ]
281280 [ DataRow ( CompleterType . Immediate , CompilerType . System ) ]
282281 [ DataRow ( CompleterType . Immediate , CompilerType . Interpret ) ]
0 commit comments