package org.matrix.actuators.sql;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * SqlExpActuatorTest.
 *
 * @author Matrix <xhyrzldf@gmail.com>
 * @since 2022/1/20 at 3:08 PM
 * Suffering is the most powerful teacher of life.
 */
@RunWith(SpringRunner.class)
@SpringBootTest
class SqlExpActuatorTest {

    @Autowired
    private SqlExpActuator sqlExpActuator;

    @Test
    void parseVarByName() {
        // todo 这里的递归校验要多写一点
        String result = sqlExpActuator.parseVarByName("${componentName}[2]", 1L, 1L);
        System.out.println(result);
        Assertions.assertNotNull(result);
    }

    @Test
    void parseVarById() {
    }
}