File tree 1 file changed +33
-33
lines changed
1 file changed +33
-33
lines changed Original file line number Diff line number Diff line change 1
- using System ;
2
- using System . Collections . Generic ;
3
- using System . Linq ;
4
- using System . Text ;
5
- using System . Threading . Tasks ;
6
-
7
- #if NETFX_CORE
8
- using Microsoft . VisualStudio . TestPlatform . UnitTestFramework ;
9
- #else
10
- using NUnit . Framework ;
11
- #endif
12
-
13
- namespace SQLite . Tests
14
- {
15
- public class ExceptionAssert
16
- {
17
- public static T Throws < T > ( Action action ) where T : Exception
18
- {
19
- try
20
- {
21
- action ( ) ;
22
- }
23
- catch ( T ex )
24
- {
25
- return ex ;
26
- }
27
-
28
- Assert . Fail ( "Expected exception of type {0}." , typeof ( T ) ) ;
29
-
30
- return null ;
31
- }
32
- }
33
- }
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Text ;
5
+ using System . Threading . Tasks ;
6
+
7
+ #if NETFX_CORE
8
+ using Microsoft . VisualStudio . TestPlatform . UnitTestFramework ;
9
+ #else
10
+ using NUnit . Framework ;
11
+ #endif
12
+
13
+ namespace SQLite . Tests
14
+ {
15
+ public class ExceptionAssert
16
+ {
17
+ public static T Throws < T > ( Action action ) where T : Exception
18
+ {
19
+ try
20
+ {
21
+ action ( ) ;
22
+ }
23
+ catch ( T ex )
24
+ {
25
+ return ex ;
26
+ }
27
+
28
+ Assert . Fail ( "Expected exception of type {0}." , typeof ( T ) ) ;
29
+
30
+ return null ;
31
+ }
32
+ }
33
+ }
You can’t perform that action at this time.
0 commit comments