package com.ruoyi.generator.service.front;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

public class AiCostCalculatorTest
{
    @Test
    public void missingTokensCostNothing()
    {
        AiCostCalculator calculator = new AiCostCalculator();

        assertEquals(0, calculator.estimateCostCents("deepseek", "deepseek-chat", null, null));
        assertEquals(0, calculator.estimateCostCents("deepseek", "deepseek-chat", 0, 0));
    }

    @Test
    public void deepSeekChatUsesInputAndOutputRates()
    {
        AiCostCalculator calculator = new AiCostCalculator();

        assertEquals(1, calculator.estimateCostCents("deepseek", "deepseek-chat", 1_000, 1_000));
        assertEquals(3, calculator.estimateCostCents("deepseek", "deepseek-chat", 2_000, 4_000));
    }
}
