22// The .NET Foundation licenses this file to you under the MIT license.
33
44using nanoFramework . TestFramework ;
5- using System ;
6- using System . Diagnostics ;
7- using System . Threading ;
85
96namespace System . Threading
107{
@@ -28,7 +25,7 @@ public void SimmpleTokenCancellationTest()
2825 } ) . Start ( ) ;
2926 TestCancealltionToken ( token ) ;
3027 // Assert
31- Assert . True ( isCancelledFunction ) ;
28+ Assert . IsTrue ( isCancelledFunction ) ;
3229 }
3330
3431 private void TestCancealltionToken ( CancellationToken csToken )
@@ -69,7 +66,7 @@ public void SimmpleTokenCancellationThreadsTest()
6966 // Assert
7067 // Clean in case
7168 toCancelThread ? . Abort ( ) ;
72- Assert . True ( isCancelledFunction ) ;
69+ Assert . IsTrue ( isCancelledFunction ) ;
7370
7471 }
7572
@@ -83,7 +80,7 @@ public void CallbackRegistrationTests()
8380 CancellationTokenRegistration ctr = token . Register ( ActionToNotify ) ;
8481 // Act
8582 cs . Cancel ( ) ;
86- Assert . True ( isCancelledAction ) ;
83+ Assert . IsTrue ( isCancelledAction ) ;
8784 }
8885
8986
@@ -110,27 +107,27 @@ public void CallbackRegistrationAndThreadsTests()
110107 // Clean in case
111108 toCancelThread ? . Abort ( ) ;
112109
113- Assert . True ( isCancelledFunction ) ;
110+ Assert . IsTrue ( isCancelledFunction ) ;
114111 }
115112
116113 [ TestMethod ]
117114 public void TimerCancellationTest ( )
118115 {
119116 CancellationTokenSource cs = new ( 200 ) ;
120117 CancellationToken token = cs . Token ;
121- Assert . False ( token . IsCancellationRequested ) ;
118+ Assert . IsFalse ( token . IsCancellationRequested ) ;
122119 Thread . Sleep ( 210 ) ;
123- Assert . True ( token . IsCancellationRequested ) ;
120+ Assert . IsTrue ( token . IsCancellationRequested ) ;
124121 }
125122
126123 [ TestMethod ]
127124 public void TimerCancellationTokenTest ( )
128125 {
129126 CancellationTokenSource cs = new ( ) ;
130127 cs . CancelAfter ( 200 ) ;
131- Assert . False ( cs . IsCancellationRequested ) ;
128+ Assert . IsFalse ( cs . IsCancellationRequested ) ;
132129 Thread . Sleep ( 210 ) ;
133- Assert . True ( cs . IsCancellationRequested ) ;
130+ Assert . IsTrue ( cs . IsCancellationRequested ) ;
134131 }
135132 }
136133}
0 commit comments