DatacubeGetarticlesummaryTest.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using JCSoft.WX.Framework.Models.ApiRequests;
  7. using JCSoft.WX.Framework.Models.ApiResponses;
  8. using Xunit;
  9. namespace FrameworkCoreTest.Api
  10. {
  11. public class DatacubeGetarticlesummaryTest : MockPostApiBaseTest<DatacubeGetarticlesummaryRequest, DatacubeGetArticlesResponse>
  12. {
  13. protected override DatacubeGetarticlesummaryRequest InitRequestObject()
  14. {
  15. return new DatacubeGetarticlesummaryRequest
  16. {
  17. AccessToken = "123",
  18. BeginDate = "2015-04-14",
  19. EndDate = "2015-04-16"
  20. };
  21. }
  22. public override DatacubeGetArticlesResponse GetResponse()
  23. {
  24. return mock_client.Object.Execute(Request);
  25. }
  26. protected override string GetReturnResult(bool errResult)
  27. {
  28. if (errResult) return s_errmsg;
  29. return @"{
  30. ""list"": [
  31. {
  32. ""ref_date"": ""2014-12-08"",
  33. ""msgid"": ""10000050_1"",
  34. ""title"": ""12月27日 DiLi日报"",
  35. ""int_page_read_user"": 23676,
  36. ""int_page_read_count"": 25615,
  37. ""ori_page_read_user"": 29,
  38. ""ori_page_read_count"": 34,
  39. ""share_user"": 122,
  40. ""share_count"": 994,
  41. ""add_to_fav_user"": 1,
  42. ""add_to_fav_count"": 3
  43. }
  44. //后续会列出该日期内所有被阅读过的文章(仅包括群发的文章)在当天的阅读次数等数据
  45. ]
  46. }";
  47. }
  48. }
  49. }