package com.ruoyi.web.modules.prosperity.service;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

/**
 * GTFY-NB-UT-015 只读模块无写操作
 */
@DisplayName("IAchievementReportService 只读约束")
class IAchievementReportServiceContractTest
{

    @Test
    @DisplayName("GTFY-NB-UT-015 接口仅查询方法")
    void ut015_readOnlyMethods()
    {
        Set<String> names = Arrays.stream(IAchievementReportService.class.getMethods())
                .map(Method::getName)
                .collect(Collectors.toSet());
        assertEquals(2, names.size());
        assertTrue(names.contains("getAnnualReport"));
        assertTrue(names.contains("listAvailableYears"));
    }
}
