package com.starry.admin.api;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Import;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.web.servlet.MockMvc;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureMockMvc
@ActiveProfiles("apitest")
@TestPropertySource(properties = "spring.task.scheduling.enabled=false")
@Import(MockWxMpServiceConfig.class)
public abstract class AbstractApiTest {

    protected static final String TENANT_HEADER = "X-Tenant";
    protected static final String USER_HEADER = "X-Test-User";
    protected static final String DEFAULT_TENANT = "tenant-apitest";
    protected static final String DEFAULT_USER = "apitest-user";

    @Autowired
    protected MockMvc mockMvc;
}
