@@ -123,7 +123,18 @@ public void TestNestedNoSchemeThrowException()
123
123
124
124
ExceptionAssert . Throws < NotFoundRouteException > ( ( ) =>
125
125
{
126
- router . Dispatch ( "ui://helloworld/call" ) ;
126
+ try
127
+ {
128
+ router . Dispatch ( "ui://helloworld/call" ) ;
129
+ }
130
+ catch ( Exception ex )
131
+ {
132
+ while ( ex . InnerException != null )
133
+ {
134
+ ex = ex . InnerException ;
135
+ }
136
+ throw ex ;
137
+ }
127
138
} ) ;
128
139
129
140
Assert . AreEqual ( 1 , throwNotFound ) ;
@@ -155,7 +166,18 @@ public void TestSimpleException()
155
166
156
167
ExceptionAssert . Throws < ArgumentNullException > ( ( ) =>
157
168
{
158
- router . Dispatch ( "ui://helloworld/call" ) ;
169
+ try
170
+ {
171
+ router . Dispatch ( "ui://helloworld/call" ) ;
172
+ }
173
+ catch ( Exception ex )
174
+ {
175
+ while ( ex . InnerException != null )
176
+ {
177
+ ex = ex . InnerException ;
178
+ }
179
+ throw ex ;
180
+ }
159
181
} ) ;
160
182
161
183
Assert . AreEqual ( 1 , throwError ) ;
@@ -206,7 +228,18 @@ public void TestNestedException()
206
228
207
229
ExceptionAssert . Throws < ArgumentNullException > ( ( ) =>
208
230
{
209
- router . Dispatch ( "ui://helloworld/call" ) ;
231
+ try
232
+ {
233
+ router . Dispatch ( "ui://helloworld/call" ) ;
234
+ }
235
+ catch ( Exception ex )
236
+ {
237
+ while ( ex . InnerException != null )
238
+ {
239
+ ex = ex . InnerException ;
240
+ }
241
+ throw ex ;
242
+ }
210
243
} ) ;
211
244
212
245
Assert . AreEqual ( 12 , throwError ) ;
@@ -287,7 +320,18 @@ public void TestNestedNotFoundRouteTest()
287
320
{
288
321
ExceptionAssert . Throws < NotFoundRouteException > ( ( ) =>
289
322
{
290
- router . Dispatch ( "ui://helloworld/call2" ) ;
323
+ try
324
+ {
325
+ router . Dispatch ( "ui://helloworld/call2" ) ;
326
+ }
327
+ catch ( Exception ex )
328
+ {
329
+ while ( ex . InnerException != null )
330
+ {
331
+ ex = ex . InnerException ;
332
+ }
333
+ throw ex ;
334
+ }
291
335
} ) ;
292
336
res . SetContext ( "helloworld" ) ;
293
337
} ) ;
0 commit comments