public void GetLikesFromHtmlTest() { var getterPosts = new vk_Api_groups.GetterTopPosts("", "21447539"); var resp = HttpGetter.GET_http("https://api.vk.com/method/wall.get.xml?count=" + "1" + "&owner_id=" + "19351792");//+ "&access_token=" + _token); var doc = new HtmlDocument(); doc.LoadHtml(resp); var likes = doc.DocumentNode.SelectNodes("//likes"); var likesArr = vk_Api_groups.GetterTopPosts.GetLikesArrFromHtml(likes); Assert.AreEqual(likesArr[0], "0"); }
public SetParser(Settings settings, HttpGetter httpGetter, CardTypeMapper cardTypeMapper) { _settings = settings; _httpGetter = httpGetter; _cardTypeMapper = cardTypeMapper; }
public async Task UploadAsyncTest2_VkPostCreator() { var httpGetter = new HttpGetter(new HttpClient()); VkPostCreator pc = new VkPostCreator(_vkConfig, new ImageLoader(_vkConfig, httpGetter), new VkPoster(httpGetter)); var r = await pc.PostToVkAsync("tt", new[] { "https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/68dd54ca-60cf-4ef7-898b-26d7cbe48ec7/10-dithering-opt.jpg" }); }