package com.ruoyi.web.modules.merchant.support;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
import com.ruoyi.web.modules.merchant.constant.MerchantConstants;

class CertStatusTransitionTest
{
    @Test
    void normal_to_frozen_allowed()
    {
        assertTrue(CertStatusTransition.canTransition(MerchantConstants.CERT_NORMAL, MerchantConstants.CERT_FROZEN));
    }

    @Test
    void cancelled_to_frozen_notAllowed()
    {
        assertFalse(CertStatusTransition.canTransition(MerchantConstants.CERT_CANCELLED, MerchantConstants.CERT_FROZEN));
    }

    @Test
    void cancelled_to_normal_allowed()
    {
        assertTrue(CertStatusTransition.canTransition(MerchantConstants.CERT_CANCELLED, MerchantConstants.CERT_NORMAL));
    }
}
