public void GetComicFromURLTest() { WebComicService svc = new WebComicService(); var response = svc.GetComicFromUrl(TODAY_COMIC_URL).Result; Assert.IsTrue(response.Success); }
public void GetComicByCodeTest() { WebComicService svc = new WebComicService(); var response = svc.GetComicByCode(1, COMIC_URL_TPL).Result; Assert.IsTrue(response.Success); }
public MainWindow() { InitializeComponent(); // set the current culture for the datetime converter this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag); var httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Accept.Clear(); httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var comicService = new WebComicService(httpClient); viewModel = new ComicViewModel(comicService); this.DataContext = viewModel; }
public HomeController(ILogger <HomeController> logger, WebComicService service) { _logger = logger; _service = service; }