package com.rj.scheduler;

import com.rj.entity.SalesManagement;
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.junit.jupiter.SpringJUnitConfig;

import static org.junit.jupiter.api.Assertions.*;

/**
 * SalesManagementMockInsertDataScheduler 单元测试
 * 测试 generateDailySalesData 方法，真实插入数据库
 *
 * @author Test
 * @since 2025-01-27
 */
@SpringJUnitConfig
@SpringBootTest
class SalesManagementMockInsertDataSchedulerTest {

    @Autowired
    private SalesManagementMockInsertDataScheduler salesManagementMockInsertDataScheduler;

    @Test
    void testGenerateDailySalesData() {
        try {
            // 执行真实的数据生成和插入
            salesManagementMockInsertDataScheduler.generateDailySalesData();
            
            
        } catch (Exception e) {
            fail("generateDailySalesData 方法执行失败: " + e.getMessage());
        }
    }

  
}
