package com.example.demo; import com.example.demo.service.SNService; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.StringUtils; import java.io.File; import java.util.Date; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest public class SNManageApplicationTest { @Autowired SNService snService; @Value("${SN.file.path}") String SNFilePath; @Value("${SN.file.temp.path}") String SNTempFilePath; @Test public void test() throws Exception { String encryptedSN = "c24x"; snService.deleteSN(encryptedSN); } }