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); } }
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); } }