protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 3); _chunk1 = CreateByteArray(random, ChunkLength); _chunk2 = CreateByteArray(random, ChunkLength - 17); _chunk2CatchUp1 = CreateByteArray(random, 10); _chunk2CatchUp2 = CreateByteArray(random, 7); _chunk3 = CreateByteArray(random, ChunkLength); _chunk4 = CreateByteArray(random, ChunkLength); _chunk5 = CreateByteArray(random, ChunkLength); _chunk6 = new byte[0]; _chunk1BeginRead = new ManualResetEvent(false); _chunk2BeginRead = new ManualResetEvent(false); _chunk3BeginRead = new ManualResetEvent(false); _chunk4BeginRead = new ManualResetEvent(false); _chunk5BeginRead = new ManualResetEvent(false); _waitBeforeChunk6 = new ManualResetEvent(false); _chunk6BeginRead = new ManualResetEvent(false); _fileSize = _chunk1.Length + _chunk2.Length + _chunk2CatchUp1.Length + _chunk2CatchUp2.Length + _chunk3.Length + _chunk4.Length + _chunk5.Length; _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); }
protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 5); _fileSize = 5000; _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); _disposeCompleted = new ManualResetEvent(false); }
protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 5); _fileSize = random.Next(); _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); _exception = new SshException(); }
protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 5); _chunk1 = CreateByteArray(random, ChunkLength); _chunk2 = CreateByteArray(random, ChunkLength); _chunk3 = new byte[0]; _fileSize = _chunk1.Length + _chunk2.Length; _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); }
protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 5); _chunk1 = CreateByteArray(random, ChunkLength); // chunk is less than the requested length, but - together with chunk 1 - contains all data up to the EOF _chunk2 = CreateByteArray(random, ChunkLength - 10); _chunk3 = new byte[0]; _fileSize = _chunk1.Length + _chunk2.Length; _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); }
protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 5); _chunk1 = CreateByteArray(random, ChunkLength); _chunk2 = CreateByteArray(random, ChunkLength); _fileSize = _chunk1.Length + _chunk2.Length + 1; _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); _exception = new SshException(); _exceptionSignaled = new ManualResetEvent(false); }
protected override void SetupData() { var random = new Random(); _handle = CreateByteArray(random, 5); _chunk1 = CreateByteArray(random, ChunkLength); _chunk3 = CreateByteArray(random, ChunkLength); _fileSize = 4 * ChunkLength; _waitHandleArray = new WaitHandle[2]; _operationTimeout = random.Next(10000, 20000); _closeAsyncResult = new SftpCloseAsyncResult(null, null); _readAheadChunk2Completed = new ManualResetEvent(false); _readAheadChunk3Completed = new ManualResetEvent(false); _waitingForSemaphoreAfterCompletingChunk3 = new ManualResetEvent(false); _exception = new SshException(); }