SampleTest.java 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package org.jeecg;
  2. import cn.com.ctop.common.module.entity.CtopOauthToken;
  3. import cn.com.ctop.common.module.service.ICtopOauthTokenService;
  4. import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
  5. import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeService;
  6. import cn.com.ctop.toutiao.modules.report.service.IReportService;
  7. import org.junit.Test;
  8. import org.junit.runner.RunWith;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.boot.test.context.SpringBootTest;
  11. import org.springframework.test.context.ActiveProfiles;
  12. import org.springframework.test.context.junit4.SpringRunner;
  13. @RunWith(SpringRunner.class)
  14. @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
  15. @ActiveProfiles("wps")
  16. public class SampleTest {
  17. @Autowired
  18. private ICtopOauthTokenService oauthTokenService;
  19. @Autowired
  20. private IReportService reportService;
  21. @Autowired
  22. private IByteDanceCreativeService creativeService;
  23. @Autowired
  24. private IByteDanceCampaignService campaignService;
  25. @Test
  26. public void loadBytedanceCreativeData() {
  27. CtopOauthToken token = oauthTokenService.getTokenByAccountId(1649600126891015L);
  28. creativeService.getAdvertiserCreative(token,null,null);
  29. }
  30. @Test
  31. public void testLoadBytedanceData(){
  32. CtopOauthToken token = oauthTokenService.getTokenByAccountId(1673731621920840L);
  33. campaignService.getAdvertiserCampaign(token,null,null);
  34. }
  35. }