88using System ;
99using System . IO ;
1010
11- namespace Sytem . IO . MemoryStreamUnitTests
11+ namespace System . IO . MemoryStreamUnitTests
1212{
1313 [ TestClass ]
1414 public class Length
@@ -51,7 +51,7 @@ public void ObjectDisposed()
5151
5252 long length = 0 ;
5353
54- Assert . Throws ( typeof ( ObjectDisposedException ) ,
54+ Assert . ThrowsException ( typeof ( ObjectDisposedException ) ,
5555 ( ) =>
5656 {
5757 length = ms . Length ;
@@ -74,32 +74,32 @@ public void LengthTests()
7474 OutputHelper . WriteLine ( "Set initial length to 50, and position to 50" ) ;
7575 ms . SetLength ( 50 ) ;
7676 ms . Position = 50 ;
77- Assert . True ( TestLength ( ms , 50 ) ) ;
77+ Assert . IsTrue ( TestLength ( ms , 50 ) ) ;
7878
7979 OutputHelper . WriteLine ( "Write 'foo bar'" ) ;
8080
8181 StreamWriter sw = new StreamWriter ( ms ) ;
8282 sw . Write ( "foo bar" ) ;
8383 sw . Flush ( ) ;
84- Assert . True ( TestLength ( ms , 57 ) ) ;
84+ Assert . IsTrue ( TestLength ( ms , 57 ) ) ;
8585
8686 OutputHelper . WriteLine ( "Shorten Length to 30" ) ;
8787 ms . SetLength ( 30 ) ;
88- Assert . True ( TestLength ( ms , 30 ) ) ;
88+ Assert . IsTrue ( TestLength ( ms , 30 ) ) ;
8989
9090 OutputHelper . WriteLine ( "Verify position was adjusted" ) ;
91- Assert . True ( TestPosition ( ms , 30 ) ) ;
91+ Assert . IsTrue ( TestPosition ( ms , 30 ) ) ;
9292
9393 OutputHelper . WriteLine ( "Extend length to 100" ) ;
9494 ms . SetLength ( 100 ) ;
95- Assert . True ( TestLength ( ms , 100 ) ) ;
95+ Assert . IsTrue ( TestLength ( ms , 100 ) ) ;
9696 }
9797
9898 OutputHelper . WriteLine ( "Verify memorystream is 0 bytes after close" ) ;
9999
100100 using ( MemoryStream ms = new MemoryStream ( ) )
101101 {
102- Assert . True ( TestLength ( ms , 0 ) ) ;
102+ Assert . IsTrue ( TestLength ( ms , 0 ) ) ;
103103 }
104104 }
105105 catch ( Exception ex )
0 commit comments