コード例 #1
0
        public async Task TestSearchHasNoResultImages()
        {
            var service = new SearchImageService(new UnsplashImageFactory(false), "dfafefsdfasfsdf");
            var result  = await service.GetImagesAsync(CTSFactory.MakeCTS().Token);

            Assert.IsTrue(result?.Count() == 0);
        }
コード例 #2
0
        private async Task SearchByKeywordAsync()
        {
            var searchService = new SearchImageService(NormalFactory, SearchKeyword);

            DataVM = new SearchResultViewModel(this, searchService);
            RaisePropertyChanged(() => SelectedTitle);
            await RefreshListAsync();
        }
コード例 #3
0
        public async Task TestSearchHasNoResultImages()
        {
            var service = new SearchImageService(new UnsplashImageFactory(false),
                                                 CancellationTokenSourceFactory.CreateDefault(), "dfafefsdfasfsdf");
            var result = await service.GetImagesAsync();

            Assert.IsTrue(result?.Count() == 0);
        }
コード例 #4
0
 public SearchResultViewModel(MainViewModel viewModel, SearchImageService service) :
     base(viewModel, service)
 {
 }