public async void Service_WithoutConnection_MustReturnNull() { var connection = ConnectionBuilder.Create().WithCheckConnectionValue(false).Build(); var service = new LocalDriveService(connection); var value = await service.GetDrives(); Assert.Null(value); }
public async void Service_GetStorageList_MustReturnSpectedValue() { var service = new LocalDriveService(); var expectedValue = System.IO.DriveInfo .GetDrives() .Select(drive => drive.RootDirectory.FullName) .ToArray(); var drivesList = await service.GetDrives(); var value = drivesList.Select(x => x.ID).ToArray(); Assert.Equal(expectedValue, value); }