mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-30 01:46:18 +08:00
use student id as primary key instead.
This commit is contained in:
26
src/test/java/love/sola/netsupport/wechat/TestGson.java
Normal file
26
src/test/java/love/sola/netsupport/wechat/TestGson.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package love.sola.netsupport.wechat;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import love.sola.netsupport.config.Settings;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* Created by Sola on 2015/11/26.
|
||||
* Don't modify this source without my agreement
|
||||
* ***********************************************
|
||||
*/
|
||||
public class TestGson {
|
||||
|
||||
@Test
|
||||
public void testGson() {
|
||||
Gson gson = new Gson();
|
||||
Settings settings = new Settings();
|
||||
settings.Wechat_AppId = "*";
|
||||
settings.Wechat_Secret = "*";
|
||||
settings.Wechat_Token = "*";
|
||||
settings.Wechat_AesKey = "*";
|
||||
System.out.println(gson.toJson(settings));
|
||||
}
|
||||
|
||||
}
|
||||
21
src/test/java/love/sola/netsupport/wechat/TestRegex.java
Normal file
21
src/test/java/love/sola/netsupport/wechat/TestRegex.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package love.sola.netsupport.wechat;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* Created by Sola on 2015/11/26.
|
||||
* Don't modify this source without my agreement
|
||||
* ***********************************************
|
||||
*/
|
||||
public class TestRegex {
|
||||
|
||||
public static final String STUDENT_ID_REGEX = "^(2012|2013|2014|2015)[0-9]{9}";
|
||||
|
||||
@Test
|
||||
public void testStudentId() {
|
||||
System.out.println("2011130201233".matches(STUDENT_ID_REGEX));
|
||||
System.out.println("2015130201233".matches(STUDENT_ID_REGEX));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user