コード例 #1
0
        public async Task Init()
        {
            logger.Info("Getting all available starships.");

            starships = await starshipService.GetAll();

            logger.Success($"Found {starships.Count} starships.");
        }
コード例 #2
0
ファイル: TestRunner.cs プロジェクト: stsrki/SwapiDC
        public async Task Test_runner_info()
        {
            starshipService.GetAll().Returns(new List <Starship>
            {
                new Starship {
                    Name = "Millennium Falcon"
                }
            });

            var runner = new Runner(logger, calculator, starshipService);

            await runner.Init();

            runner.Run(1000000);

            logger.Received().Info("Millennium Falcon needs to stop: ", Arg.Any <object>());
        }
コード例 #3
0
ファイル: MainPresenter.cs プロジェクト: levibrian/swjc
        private async Task FetchAndDisplayData(long distance)
        {
            var starshipCollection = await starshipService.GetAll(Convert.ToInt64(distance));

            foreach (var starship in starshipCollection)
            {
                DisplayStarship(starship);
            }
        }
コード例 #4
0
 public async Task Init()
 {
     starships = await starshipService.GetAll();
 }
コード例 #5
0
ファイル: StarshipServiceTest.cs プロジェクト: levibrian/swjc
        public async Task GetAllTest()
        {
            var results = await starshipService.GetAll(15000);

            Assert.IsNotNull(results);
        }