package com.ruoyi;

import com.aizuda.snailjob.client.job.core.handler.query.RequestQueryHandler;
import com.aizuda.snailjob.model.response.JobApiResponse;
import com.ruoyi.RuoYiApplication;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.interfaces.api.SnailJobApi;
import org.jasypt.encryption.StringEncryptor;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Date;
@SpringBootTest(classes = RuoYiApplication.class)
@TestPropertySource(properties = {"spring.profiles.active=druid"})
public class JasyptTest {
    private static final Logger log = LoggerFactory.getLogger(JasyptTest.class);
    @Autowired
    private StringEncryptor stringEncryptor;

    @Test
    public void encryptPwd() {
        RequestQueryHandler jobDetail = SnailJobApi.getJobDetail(1l);
        JobApiResponse execute = jobDetail.execute();
        System.out.println(execute.toString());
    }

}