28 lines
768 B
Java
28 lines
768 B
Java
package com.mesasoft.cn.config;
|
|
|
|
import com.mesasoft.cn.WebSketchApplication;
|
|
import com.mesasoft.cn.WebSketchApplicationTest;
|
|
import com.mesasoft.cn.modules.constant.ConfigConsts;
|
|
import org.junit.Test;
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
/**
|
|
* @author pantao
|
|
* @since 2018/1/26
|
|
*/
|
|
public class SettingConfigTest {
|
|
|
|
@Test
|
|
public void testFileSuffixPattern() {
|
|
WebSketchApplicationTest.setSettings();
|
|
assert Pattern.compile(WebSketchApplication.settings.getStringUseEval(ConfigConsts.FILE_SUFFIX_MATCH_OF_SETTING)).matcher("jpg").matches();
|
|
}
|
|
|
|
@Test
|
|
public void testGetStoragePath() {
|
|
WebSketchApplicationTest.setSettings();
|
|
System.out.println(SettingConfig.getStoragePath(ConfigConsts.TOKEN_OF_SETTINGS));
|
|
}
|
|
}
|