public async void Download_WithInvalidParameter_MustReturnNull(string fileID) { var service = new LocalDriveService(); var value = await service.Download(fileID); Assert.Null(value); }
public async void Download_WithoutConnection_MustReturnNull() { var connection = ConnectionBuilder.Create().WithCheckConnectionValue(false).Build(); var service = new LocalDriveService(connection); var fileID = (string)null; var value = await service.Download(fileID); Assert.Null(value); }
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); } }