CustomserviceKfsessionCloseTest.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 CustomserviceKfsessionCloseTest : MockPostApiBaseTest<CustomserviceKfsessionCloseRequest, CustomserviceKfsessionCloseResponse>
  12. {
  13. protected override CustomserviceKfsessionCloseRequest InitRequestObject()
  14. {
  15. return new CustomserviceKfsessionCloseRequest
  16. {
  17. AccessToken = "123",
  18. KfAccount = "kf@kf.com",
  19. OpenId = "asdf",
  20. Text = "zsdfa"
  21. };
  22. }
  23. protected override string GetReturnResult(bool errResult)
  24. {
  25. if (errResult) return s_errmsg;
  26. return @" {
  27. ""errcode"" : 0,
  28. ""errmsg"" : ""ok""
  29. }";
  30. }
  31. public override CustomserviceKfsessionCloseResponse GetResponse()
  32. {
  33. return mock_client.Object.Execute(Request);
  34. }
  35. }
  36. }