private void GetTopTenCommandAction()
        {
            TopTenEstateAgents.Clear();
            try
            {
                //In future we want to make this one awaited and UI responsive
                var topTenEstateAgents = topEstateAgentsService.GetTopTenEstateAgentElements(HasGarden).GetAwaiter().GetResult();
                foreach (var topTenEstateAgent in topTenEstateAgents)
                {
                    TopTenEstateAgents.Add(topTenEstateAgent.ToString());
                }
            }
            catch (RequestLimitExceededException ex)
            {
                ErrorText = ex.Message;
            }
            catch (Exception)
            {
                ErrorText = "Something went wrong";
            }

            PropertyChanged(this, new PropertyChangedEventArgs(nameof(ErrorText)));
        }
Exemplo n.º 2
0
        public async Task GetEstateElementsAsyncTast()
        {
            var resultWithGarden = await topEstateAgentsService.GetTopTenEstateAgentElements(true);

            Assert.IsTrue(resultWithGarden.Any());
        }