This repository was archived by the owner on Nov 19, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ public void AlternateExceptionHandler(Exception ex)
277277 }
278278 }
279279
280+ #if CLR_2_0 || CLR_4_0
280281 public static class StaticClassWithExpectedExceptions
281282 {
282283 [ Test , ExpectedException ( typeof ( ArgumentException ) ) ]
@@ -296,4 +297,5 @@ public static void TestFailsInStaticClass_WrongExceptionThrown()
296297 throw new InvalidOperationException ( "wrong exception" ) ;
297298 }
298299 }
300+ #endif
299301}
Original file line number Diff line number Diff line change @@ -444,25 +444,27 @@ public void TestIsNotRunnableWhenAlternateHandlerIsNotFound()
444444 test . Properties . Get ( PropertyNames . SkipReason ) ) ;
445445 }
446446
447+ #if CLR_2_0 || CLR_4_0
447448 [ Test ]
448449 public void TestSucceedsInStaticClass ( )
449450 {
450- var result = TestBuilder . RunTestCase ( typeof ( StaticClassWithExpectedExceptions ) , "TestSucceedsInStaticClass" ) ;
451+ ITestResult result = TestBuilder . RunTestCase ( typeof ( StaticClassWithExpectedExceptions ) , "TestSucceedsInStaticClass" ) ;
451452 Assert . That ( result . ResultState , Is . EqualTo ( ResultState . Success ) ) ;
452453 }
453454
454455 [ Test ]
455456 public void TestFailsInStaticClass_NoExceptionThrown ( )
456457 {
457- var result = TestBuilder . RunTestCase ( typeof ( StaticClassWithExpectedExceptions ) , "TestFailsInStaticClass_NoExceptionThrown" ) ;
458+ ITestResult result = TestBuilder . RunTestCase ( typeof ( StaticClassWithExpectedExceptions ) , "TestFailsInStaticClass_NoExceptionThrown" ) ;
458459 Assert . That ( result . ResultState , Is . EqualTo ( ResultState . Failure ) ) ;
459460 }
460461
461462 [ Test ]
462463 public void TestFailsInStaticClass_WrongExceptionThrown ( )
463464 {
464- var result = TestBuilder . RunTestCase ( typeof ( StaticClassWithExpectedExceptions ) , "TestFailsInStaticClass_WrongExceptionThrown" ) ;
465+ ITestResult result = TestBuilder . RunTestCase ( typeof ( StaticClassWithExpectedExceptions ) , "TestFailsInStaticClass_WrongExceptionThrown" ) ;
465466 Assert . That ( result . ResultState , Is . EqualTo ( ResultState . Failure ) ) ;
466467 }
467- }
468+ #endif
469+ }
468470}
You can’t perform that action at this time.
0 commit comments