1
0
mirror of synced 2025-12-22 00:48:00 +08:00

add signature check

This commit is contained in:
Daniel Qian
2014-08-22 14:52:11 +08:00
parent d81324a7cd
commit e5e729918b
3 changed files with 51 additions and 1 deletions

View File

@@ -69,6 +69,14 @@ public class WxServiceTest {
wxService.deleteMenu();
}
@Test
public void testCheckSignature() throws WxErrorException {
String timestamp = "23234235423246";
String nonce = "y7didfkcmvnbd90sdofjkiefhsd";
String signature = "77b6651628dfb9a64bfb0d3432ee053ac566a459";
Assert.assertTrue(wxService.checkSignature(timestamp, nonce, signature));
}
@DataProvider(name="menu")
public Object[][] getMenu() throws JAXBException {
WxMenu menu = new WxMenu();
@@ -116,7 +124,6 @@ public class WxServiceTest {
}
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public static class WxXmlConfigStorage extends WxInMemoryConfigStorage {