package org.jeecg.modules.adweb.seo.service;

import org.jeecg.modules.adweb.common.constant.AdwebConstant;
import org.jeecg.modules.adweb.seo.service.dataforseo.DataForSEOService;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;

import java.util.Collections;

/**
 * @author wfansh
 */
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("dev")
public class DataForSEOTest {

    @Autowired private DataForSEOService dataForSEOService;

    @Test
    @Disabled("DataForSEO创建Serp任务收费")
    public void testRunKeywordsSerpTasks() {
        dataForSEOService.runKeywordsSerpTasks(
                Collections.EMPTY_LIST, AdwebConstant.KEYWORD_TYPE_APPOINT, 10);
    }

    @Test
    @Disabled("DataForSEO读取Serp结果免费 - 但用例影响生产数据")
    public void testSyncKeywordsSerpResults() {
        dataForSEOService.syncKeywordsSerpResults();
    }
}
