@@ -155,27 +155,27 @@ public void Test_Sftp_EnumerateDirectory_HugeDirectory()
155155 {
156156 sftp . CreateDirectory ( string . Format ( "test_{0}" , i ) ) ;
157157 }
158- Debug . WriteLine ( "Created {0} directories within {1} seconds" , count , stopwatch . Elapsed . TotalSeconds ) ;
158+ Debug . WriteLine ( string . Format ( "Created {0} directories within {1} seconds" , count , stopwatch . Elapsed . TotalSeconds ) ) ;
159159
160- stopwatch . Restart ( ) ;
160+ stopwatch . Reset ( ) ; stopwatch . Start ( ) ;
161161 var files = sftp . EnumerateDirectory ( "." ) ;
162- Debug . WriteLine ( "Listed {0} directories within {1} seconds" , count , stopwatch . Elapsed . TotalSeconds ) ;
162+ Debug . WriteLine ( string . Format ( "Listed {0} directories within {1} seconds" , count , stopwatch . Elapsed . TotalSeconds ) ) ;
163163
164164 // Ensure that directory has at least 10000 items
165- stopwatch . Restart ( ) ;
165+ stopwatch . Reset ( ) ; stopwatch . Start ( ) ;
166166 var actualCount = files . Count ( ) ;
167- Assert . IsTrue ( actualCount >= 10000 ) ;
168- Debug . WriteLine ( "Used {0} items within {1} seconds" , actualCount , stopwatch . Elapsed . TotalSeconds ) ;
167+ Assert . IsTrue ( actualCount >= count ) ;
168+ Debug . WriteLine ( string . Format ( "Used {0} items within {1} seconds" , actualCount , stopwatch . Elapsed . TotalSeconds ) ) ;
169169
170170 sftp . Disconnect ( ) ;
171171 }
172172 }
173173 finally
174174 {
175- stopwatch . Restart ( ) ;
175+ stopwatch . Reset ( ) ; stopwatch . Start ( ) ;
176176 RemoveAllFiles ( ) ;
177177 stopwatch . Stop ( ) ;
178- Debug . WriteLine ( "Removed all files within {0} seconds" , stopwatch . Elapsed . TotalSeconds ) ;
178+ Debug . WriteLine ( string . Format ( "Removed all files within {0} seconds" , stopwatch . Elapsed . TotalSeconds ) ) ;
179179 }
180180 }
181181
0 commit comments