summaryrefslogtreecommitdiff
path: root/src/test/java/com/mesasoft/cn/config/SettingConfigTest.java
blob: 980858646d2c24d59e815cfb96cbd540e97fc025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.mesasoft.cn.config;

import com.mesasoft.cn.SketchApplication;
import com.mesasoft.cn.SketchApplicationTest;
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() {
        SketchApplicationTest.setSettings();
        assert Pattern.compile(SketchApplication.settings.getStringUseEval(ConfigConsts.FILE_SUFFIX_MATCH_OF_SETTING)).matcher("jpg").matches();
    }

    @Test
    public void testGetStoragePath() {
        SketchApplicationTest.setSettings();
        System.out.println(SettingConfig.getStoragePath(ConfigConsts.TOKEN_OF_SETTINGS));
    }
}