コード例 #1
0
        public void ReadFileChunkTest_WorksFine()
        {
            // arrange
            var filePath      = @"C:\temp\in.txt";
            var fileData      = new MockFileData("test data");
            var startPosition = 5L;
            var chunkLength   = 4;

            mockFileSystem.AddFile(filePath, fileData);

            // act
            var actualBytes = target.ReadFileChunk(filePath, startPosition, chunkLength);
            var actual      = Encoding.ASCII.GetString(actualBytes);

            // assert
            Assert.Equal("data", actual);
        }