mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-10-29 16:14:16 +08:00
Use Hibernate framework to operate pojo instance, bye bye SQL strings :)
This commit is contained in:
20
src/test/java/love/sola/netsupport/wechat/TestDate.java
Normal file
20
src/test/java/love/sola/netsupport/wechat/TestDate.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package love.sola.netsupport.wechat;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* Created by Sola on 2015/12/3.
|
||||
* Don't modify this source without my agreement
|
||||
* ***********************************************
|
||||
*/
|
||||
public class TestDate {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
System.out.println(new Date());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package love.sola.netsupport.wechat;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import love.sola.netsupport.config.Settings;
|
||||
|
||||
/**
|
||||
* ***********************************************
|
||||
* 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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,4 +18,11 @@ public class TestMessageFormat {
|
||||
System.out.println(format.format(new Object[]{"wechatid"}));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testJsonp() {
|
||||
String jsonp = "...{0}...";
|
||||
MessageFormat format = new MessageFormat(jsonp);
|
||||
System.out.println(format.format(new Object[]{"{SomeData}"}));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user