@@ -30,10 +30,10 @@ public void ASRead()
30
30
var expected = 42 ;
31
31
sut . Setup ( x => x . ReadAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) )
32
32
. ReturnsAsync ( expected ) ;
33
- var read = sut . Object . Read ( null , 0 , 0 ) ;
33
+ var read = sut . Object . Read ( null ! , 0 , 0 ) ;
34
34
Assert . AreEqual ( expected , read ) ;
35
35
36
- read = sut . Object . EndRead ( sut . Object . BeginRead ( null , 0 , 0 , null , null ) ) ;
36
+ read = sut . Object . EndRead ( sut . Object . BeginRead ( null ! , 0 , 0 , null ! , null ! ) ) ;
37
37
Assert . AreEqual ( expected , read ) ;
38
38
}
39
39
@@ -46,10 +46,10 @@ public void ASWrite()
46
46
var sut = new Mock < AsyncStream > ( ) { CallBase = true } ;
47
47
sut . Setup ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) )
48
48
. Verifiable ( ) ;
49
- sut . Object . Write ( null , 0 , 0 ) ;
49
+ sut . Object . Write ( null ! , 0 , 0 ) ;
50
50
sut . Verify ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
51
51
52
- sut . Object . EndWrite ( sut . Object . BeginWrite ( null , 0 , 0 , null , null ) ) ;
52
+ sut . Object . EndWrite ( sut . Object . BeginWrite ( null ! , 0 , 0 , null ! , null ! ) ) ;
53
53
sut . Verify ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Exactly ( 2 ) ) ;
54
54
}
55
55
@@ -82,7 +82,7 @@ public void ASDispose()
82
82
[ TestMethod ]
83
83
public void ASSynchronized ( )
84
84
{
85
- Assert . ThrowsException < ArgumentNullException > ( ( ) => AsyncStream . Synchronized ( null ) ) ;
85
+ Assert . ThrowsException < ArgumentNullException > ( ( ) => AsyncStream . Synchronized ( null ! ) ) ;
86
86
var sut = new Mock < AsyncStream > ( ) { CallBase = true } ;
87
87
var synchronized = AsyncStream . Synchronized ( sut . Object ) ;
88
88
Assert . IsNotNull ( synchronized ) ;
@@ -156,23 +156,23 @@ public void ASSynchronized()
156
156
// Read
157
157
sut . Setup ( x => x . ReadAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) )
158
158
. ReturnsAsync ( expected2 ) ;
159
- var read = synchronized . ReadAsync ( null , 0 , 0 ) . Result ;
159
+ var read = synchronized . ReadAsync ( null ! , 0 , 0 ) . Result ;
160
160
Assert . AreEqual ( expected2 , read ) ;
161
- read = synchronized . Read ( null , 0 , 0 ) ;
161
+ read = synchronized . Read ( null ! , 0 , 0 ) ;
162
162
Assert . AreEqual ( expected2 , read ) ;
163
- read = synchronized . EndRead ( synchronized . BeginRead ( null , 0 , 0 , null , null ) ) ;
163
+ read = synchronized . EndRead ( synchronized . BeginRead ( null ! , 0 , 0 , null ! , null ! ) ) ;
164
164
Assert . AreEqual ( expected2 , read ) ;
165
165
166
166
// Write
167
167
sut . Setup ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) )
168
168
. Verifiable ( ) ;
169
- synchronized . WriteAsync ( null , 0 , 0 ) . Wait ( ) ;
169
+ synchronized . WriteAsync ( null ! , 0 , 0 ) . Wait ( ) ;
170
170
sut . Verify ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Once ) ;
171
- synchronized . Write ( null , 0 , 0 ) ;
171
+ synchronized . Write ( null ! , 0 , 0 ) ;
172
172
sut . Verify ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Exactly ( 2 ) ) ;
173
- synchronized . EndWrite ( synchronized . BeginWrite ( null , 0 , 0 , null , null ) ) ;
173
+ synchronized . EndWrite ( synchronized . BeginWrite ( null ! , 0 , 0 , null ! , null ! ) ) ;
174
174
sut . Verify ( x => x . WriteAsync ( It . IsAny < byte [ ] > ( ) , It . IsAny < int > ( ) , It . IsAny < int > ( ) , It . IsAny < CancellationToken > ( ) ) , Times . Exactly ( 3 ) ) ;
175
- Assert . ThrowsExceptionAsync < OperationCanceledException > ( ( ) => synchronized . WriteAsync ( null , 0 , 0 , new CancellationToken ( true ) ) ) ;
175
+ Assert . ThrowsExceptionAsync < OperationCanceledException > ( ( ) => synchronized . WriteAsync ( null ! , 0 , 0 , new CancellationToken ( true ) ) ) ;
176
176
177
177
// Async
178
178
sut . Setup ( x => x . FlushAsync ( It . IsAny < CancellationToken > ( ) ) ) . Verifiable ( ) ;
0 commit comments