public async Task Test_app_mglt_invalid() { _download.GetStarships().Returns(TestFactory.CreateMockResultMGLTUnknown()); App app = new App(_download, _logger, _function); await app.Start(100000); _logger.Received().Error("Unknown MGLT for Millennium Falcon"); }
/// <summary> /// Download all the starships from the API /// </summary> /// <returns></returns> private async Task <List <Starship> > DownloadStarships() { _logger.Message("Downloading starships from API.."); List <Starship> _starships = await _download.GetStarships(); if (_starships == null || _starships.Count == 0) { _logger.Error("Was not possible to get the starthips from the API."); } else { _logger.Message($"Found {_starships.Count} starships"); } return(_starships); }