コード例 #1
0
        public async void Download_WithValidFile_MustReturnSpectedData()
        {
            using (var sampleClone = new Helpers.SampleClone())
            {
                var service = new LocalDriveService();

                sampleClone.WriteFile();
                var expectedValue = sampleClone.FileContent.Length;
                var value         = await service.Download(sampleClone.FilePath);

                Assert.Equal(expectedValue, value?.Length);
            }
        }
コード例 #2
0
        public async void Upload_WithValidExistingFile_MustReturnSpectedData()
        {
            using (var sampleClone = new Helpers.SampleClone())
            {
                var service = new LocalDriveService();

                sampleClone.WriteFile();
                var expectedValue = await service.GetDetails(sampleClone.FilePath);

                var value = await service.Upload(sampleClone.FilePath, sampleClone.FileContent);

                Assert.Equal(expectedValue?.SizeInBytes, value?.SizeInBytes);
            }
        }