public void WhenTimeoutInGetCurrent()
        {
            var geoCoordinator = new GeoCoordinator();

            var actual = geoCoordinator.GetCurrent(TimeSpan.Zero);

            Assert.Null(actual);
        }
        public async Task <GourmetSearchResult> FindNearbyRestaurantsAsync(string apiKey, TimeSpan timeout)
        {
            GeoCoordinator geoCoordinator = new GeoCoordinator();
            var            location       = geoCoordinator.GetCurrent(timeout);

            GourmetService gourmetService = new GourmetService();

            return(await gourmetService.SearchGourmetInfosAsync(apiKey, location));
        }
        public void GetCurrent()
        {
            var geoCoordinator = new GeoCoordinator();

            var actual = geoCoordinator.GetCurrent(TimeSpan.FromMinutes(1));

            Assert.NotNull(actual);
            // 実際の位置情報が取得されているか正しくテストするのは困難なため
            // 今回は値が返ってくれば良いものとする
            // 正しい値が返ってくるかは結合(手動)テストにて確認する
            Assert.False(double.IsNaN(actual.Latitude));
            Assert.False(double.IsNaN(actual.Longitude));
        }