DatacubeGetUserSummaryTest.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 DatacubeGetUserSummaryTest : MockPostApiBaseTest<DatacubeGetUserSummaryRequest, DatacubeGetUserSummaryResponse>
  12. {
  13. protected override DatacubeGetUserSummaryRequest InitRequestObject()
  14. {
  15. return new DatacubeGetUserSummaryRequest
  16. {
  17. AccessToken = "123",
  18. BeginDate = "2015-1-1",
  19. EndDate = "2015-1-5"
  20. };
  21. }
  22. protected override string GetReturnResult(bool errResult)
  23. {
  24. if (errResult) return s_errmsg;
  25. return @"{
  26. ""list"": [
  27. {
  28. ""ref_date"": ""2014-12-07"",
  29. ""cumulate_user"": 1217056
  30. },
  31. //后续还有ref_date在begin_date和end_date之间的数据
  32. ]
  33. }";
  34. }
  35. public override DatacubeGetUserSummaryResponse GetResponse()
  36. {
  37. return mock_client.Object.Execute(Request);
  38. }
  39. }
  40. }