package com.pandoli365.bibimbap;

import com.pandoli365.bibimbap.badge.BadgeService;
import com.pandoli365.bibimbap.badge.ReputationService;
import com.pandoli365.bibimbap.mapper.BadgesMapper;
import com.pandoli365.bibimbap.mapper.GameCommentsMapper;
import com.pandoli365.bibimbap.mapper.GameReviewAxesMapper;
import com.pandoli365.bibimbap.mapper.GameReviewStatsMapper;
import com.pandoli365.bibimbap.mapper.GameReviewsMapper;
import com.pandoli365.bibimbap.mapper.GameTagsMapper;
import com.pandoli365.bibimbap.mapper.GameUploadAuditMapper;
import com.pandoli365.bibimbap.mapper.GameViewsMapper;
import com.pandoli365.bibimbap.mapper.GamesMapper;
import com.pandoli365.bibimbap.mapper.JamAwardsMapper;
import com.pandoli365.bibimbap.mapper.JamCriteriaMapper;
import com.pandoli365.bibimbap.mapper.JamEntriesMapper;
import com.pandoli365.bibimbap.mapper.JamJudgesMapper;
import com.pandoli365.bibimbap.mapper.JamReviewRatingMapper;
import com.pandoli365.bibimbap.mapper.JamScoreStatsMapper;
import com.pandoli365.bibimbap.mapper.JamScoresMapper;
import com.pandoli365.bibimbap.mapper.JamStatusLogMapper;
import com.pandoli365.bibimbap.mapper.JamTagsMapper;
import com.pandoli365.bibimbap.mapper.JamTeamMembersMapper;
import com.pandoli365.bibimbap.mapper.JamTeamsMapper;
import com.pandoli365.bibimbap.mapper.JamVotesMapper;
import com.pandoli365.bibimbap.mapper.JamsMapper;
import com.pandoli365.bibimbap.mapper.PermissionsMapper;
import com.pandoli365.bibimbap.mapper.PostCategoriesMapper;
import com.pandoli365.bibimbap.mapper.PostsMapper;
import com.pandoli365.bibimbap.mapper.RbacAuditMapper;
import com.pandoli365.bibimbap.mapper.RecruitPostsMapper;
import com.pandoli365.bibimbap.mapper.ReputationEventsMapper;
import com.pandoli365.bibimbap.mapper.TagsMapper;
import com.pandoli365.bibimbap.mapper.UnityFeedItemsMapper;
import com.pandoli365.bibimbap.mapper.UnityFeedSourcesMapper;
import com.pandoli365.bibimbap.mapper.UserAuthIdentitiesMapper;
import com.pandoli365.bibimbap.mapper.UserBadgesMapper;
import com.pandoli365.bibimbap.mapper.UserBadgesQueryMapper;
import com.pandoli365.bibimbap.mapper.UserPermissionsMapper;
import com.pandoli365.bibimbap.mapper.UsersMapper;
import com.pandoli365.bibimbap.security.JamRoleGate;
import com.pandoli365.bibimbap.security.PermissionGate;
import com.pandoli365.bibimbap.security.SsrfSafeFetcher;
import com.pandoli365.bibimbap.service.GameAssetCleanupService;
import com.pandoli365.bibimbap.service.OgPreviewService;
import com.pandoli365.bibimbap.service.PostMarkdownService;
import com.pandoli365.bibimbap.service.UnityFeedPoller;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;

@SpringBootTest(properties = {
        "spring.profiles.active=dev",
        "spring.autoconfigure.exclude="
                + "org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,"
                + "org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration"
})
class BibimbapApplicationTests {

    @MockBean
    private GamesMapper gamesMapper;

    @MockBean
    private GameCommentsMapper gameCommentsMapper;

    @MockBean
    private GameReviewsMapper gameReviewsMapper;

    @MockBean
    private GameReviewAxesMapper gameReviewAxesMapper;

    @MockBean
    private GameReviewStatsMapper gameReviewStatsMapper;

    @MockBean
    private GameViewsMapper gameViewsMapper;

    @MockBean
    private TagsMapper tagsMapper;

    @MockBean
    private GameTagsMapper gameTagsMapper;

    @MockBean
    private JamTagsMapper jamTagsMapper;

    @MockBean
    private RecruitPostsMapper recruitPostsMapper;

    @MockBean
    private UserAuthIdentitiesMapper userAuthIdentitiesMapper;

    @MockBean
    private UsersMapper usersMapper;

    @MockBean
    private PermissionsMapper permissionsMapper;

    @MockBean
    private UserPermissionsMapper userPermissionsMapper;

    @MockBean
    private RbacAuditMapper rbacAuditMapper;

    @MockBean
    private JamsMapper jamsMapper;

    @MockBean
    private JamEntriesMapper jamEntriesMapper;

    @MockBean
    private JamJudgesMapper jamJudgesMapper;

    @MockBean
    private JamTeamsMapper jamTeamsMapper;

    @MockBean
    private JamTeamMembersMapper jamTeamMembersMapper;

    @MockBean
    private JamStatusLogMapper jamStatusLogMapper;

    @MockBean
    private JamCriteriaMapper jamCriteriaMapper;

    @MockBean
    private JamScoresMapper jamScoresMapper;

    @MockBean
    private JamScoreStatsMapper jamScoreStatsMapper;

    @MockBean
    private JamVotesMapper jamVotesMapper;

    @MockBean
    private JamAwardsMapper jamAwardsMapper;

    @MockBean
    private JamReviewRatingMapper jamReviewRatingMapper;

    @MockBean
    private PermissionGate permissionGate;

    @MockBean
    private JamRoleGate jamRoleGate;

    // W3-3 포스팅 보드 신규 매퍼 6종(MyBatis autoconfigure excluded → @MockBean 필수)
    @MockBean
    private PostsMapper postsMapper;

    @MockBean
    private PostCategoriesMapper postCategoriesMapper;

    @MockBean
    private UnityFeedSourcesMapper unityFeedSourcesMapper;

    @MockBean
    private UnityFeedItemsMapper unityFeedItemsMapper;

    // W3-3 신규 컴포넌트/서비스(컨트롤러·서비스 주입 빈 — contextLoads 안정화)
    @MockBean
    private SsrfSafeFetcher ssrfSafeFetcher;

    @MockBean
    private PostMarkdownService postMarkdownService;

    @MockBean
    private OgPreviewService ogPreviewService;

    @MockBean
    private UnityFeedPoller unityFeedPoller;

    // W3-5 Unity WebGL 업로드 보안 보강 신규 빈(매퍼·서비스 — contextLoads 안정화)
    @MockBean
    private GameUploadAuditMapper gameUploadAuditMapper;

    @MockBean
    private GameAssetCleanupService gameAssetCleanupService;

    // W4 유저 배지/평판 신규 매퍼 4종 + 서비스 2종(MyBatis autoconfigure excluded → @MockBean 필수, contextLoads 안정화)
    @MockBean
    private BadgesMapper badgesMapper;

    @MockBean
    private UserBadgesMapper userBadgesMapper;

    @MockBean
    private UserBadgesQueryMapper userBadgesQueryMapper;

    @MockBean
    private ReputationEventsMapper reputationEventsMapper;

    @MockBean
    private BadgeService badgeService;

    @MockBean
    private ReputationService reputationService;

    @Test
    void contextLoads() {
    }

}
