Skip to content

Commit f4c93ab

Browse files
author
zengzhiwu
committed
update
1 parent 7929550 commit f4c93ab

4 files changed

Lines changed: 27 additions & 65 deletions

File tree

dist/jpush-java-libraryV2.jar

28.4 KB
Binary file not shown.

test/cn/jpush/api/CharacterTests.java

Lines changed: 21 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
*/
1111
public class CharacterTests {
1212

13-
14-
private String appKey = "47b9ef19d4be5de08df12aa0";//必填,例如466f7032ac604e02fb7bda89
15-
private String masterSecret = "8cc138f8dc04cbf16240daa92d8d50e2"; //必填,每个应用都对应一个masterSecret(1f0e3dad99908345f7439f8ffabdffc4)
13+
private String appKey = "57b9ef19d4be5de08df12aa0";//必填,例如466f7032ac604e02fb7bda89
14+
private String masterSecret = "5cc138f8dc04cbf16240daa92d8d50e2"; //必填,每个应用都对应一个masterSecret(1f0e3dad99908345f7439f8ffabdffc4)
1615
private JPushClient jpush = null;
1716
private int sendNo = 11111;
1817

@@ -29,9 +28,6 @@ public void before(){
2928
//jpush = new JPushClient(masterSecret, appKey,timeToLive);
3029
}
3130

32-
/*
33-
* 特殊字符测试
34-
*/
3531
@Test
3632
public void testSendNotificationWithAppKeyWithSpecialCharacter(){
3733

@@ -43,9 +39,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter(){
4339
assertEquals(erroCode, result.getErrcode());
4440
}
4541

46-
/*
47-
* 特殊字符测试
48-
*/
42+
4943
@Test
5044
public void testSendNotificationWithAppKeyWithSpecialCharacter1(){
5145

@@ -57,9 +51,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter1(){
5751
assertEquals(erroCode, result.getErrcode());
5852
}
5953

60-
/*
61-
* 特殊字符测试
62-
*/
54+
6355
@Test
6456
public void testSendNotificationWithAppKeyWithSpecialCharacter2(){
6557

@@ -71,9 +63,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter2(){
7163
assertEquals(erroCode, result.getErrcode());
7264
}
7365

74-
/*
75-
* 特殊字符测试
76-
*/
66+
7767
@Test
7868
public void testSendNotificationWithAppKeyWithSpecialCharacter3(){
7969

@@ -85,9 +75,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter3(){
8575
assertEquals(erroCode, result.getErrcode());
8676
}
8777

88-
/*
89-
* 特殊字符测试
90-
*/
78+
9179
@Test
9280
public void testSendNotificationWithAppKeyWithSpecialCharacter4(){
9381

@@ -99,9 +87,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter4(){
9987
assertEquals(erroCode, result.getErrcode());
10088
}
10189

102-
/*
103-
* 特殊字符测试
104-
*/
90+
10591
@Test
10692
public void testSendNotificationWithAppKeyWithSpecialCharacter6(){
10793

@@ -113,9 +99,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter6(){
11399
assertEquals(erroCode, result.getErrcode());
114100
}
115101

116-
/*
117-
* 特殊字符测试
118-
*/
102+
119103
@Test
120104
public void testSendNotificationWithAppKeyWithSpecialCharacter8(){
121105

@@ -127,9 +111,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter8(){
127111
assertEquals(erroCode, result.getErrcode());
128112
}
129113

130-
/*
131-
* 特殊字符测试
132-
*/
114+
133115
@Test
134116
public void testSendNotificationWithAppKeyWithSpecialCharacter7(){
135117

@@ -141,9 +123,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter7(){
141123
assertEquals(erroCode, result.getErrcode());
142124
}
143125

144-
/*
145-
* 特殊字符测试
146-
*/
126+
147127
@Test
148128
public void testSendNotificationWithAppKeyWithSpecialCharacter9(){
149129

@@ -154,9 +134,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter9(){
154134
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
155135
assertEquals(erroCode, result.getErrcode());
156136
}
157-
/*
158-
* 特殊字符测试
159-
*/
137+
160138
@Test
161139
public void testSendNotificationWithAppKeyWithSpecialCharacter11(){
162140

@@ -167,9 +145,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter11(){
167145
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
168146
assertEquals(erroCode, result.getErrcode());
169147
}
170-
/*
171-
* 特殊字符测试
172-
*/
148+
173149
@Test
174150
public void testSendNotificationWithAppKeyWithSpecialCharacter12(){
175151

@@ -180,9 +156,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter12(){
180156
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
181157
assertEquals(erroCode, result.getErrcode());
182158
}
183-
/*
184-
* 特殊字符测试
185-
*/
159+
186160
@Test
187161
public void testSendNotificationWithAppKeyWithSpecialCharacter13(){
188162

@@ -193,9 +167,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter13(){
193167
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
194168
assertEquals(erroCode, result.getErrcode());
195169
}
196-
/*
197-
* 特殊字符测试
198-
*/
170+
199171
@Test
200172
public void testSendNotificationWithAppKeyWithSpecialCharacter14(){
201173

@@ -206,9 +178,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter14(){
206178
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
207179
assertEquals(erroCode, result.getErrcode());
208180
}
209-
/*
210-
* 特殊字符测试
211-
*/
181+
212182
@Test
213183
public void testSendNotificationWithAppKeyWithSpecialCharacter15(){
214184

@@ -219,9 +189,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter15(){
219189
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
220190
assertEquals(erroCode, result.getErrcode());
221191
}
222-
/*
223-
* 特殊字符测试
224-
*/
192+
225193
@Test
226194
public void testSendNotificationWithAppKeyWithSpecialCharacter16(){
227195

@@ -232,9 +200,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter16(){
232200
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
233201
assertEquals(erroCode, result.getErrcode());
234202
}
235-
/*
236-
* 特殊字符测试
237-
*/
203+
238204
@Test
239205
public void testSendNotificationWithAppKeyWithSpecialCharacter17(){
240206

@@ -245,9 +211,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter17(){
245211
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
246212
assertEquals(erroCode, result.getErrcode());
247213
}
248-
/*
249-
* 特殊字符测试
250-
*/
214+
251215
@Test
252216
public void testSendNotificationWithAppKeyWithSpecialCharacter18(){
253217

@@ -258,9 +222,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter18(){
258222
MessageResult result = jpush.sendNotificationWithAppKey(sendNo, msgTitle, msgContent);
259223
assertEquals(erroCode, result.getErrcode());
260224
}
261-
/*
262-
* 特殊字符测试
263-
*/
225+
264226
@Test
265227
public void testSendNotificationWithAppKeyWithSpecialCharacter19(){
266228

@@ -272,9 +234,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter19(){
272234
assertEquals(erroCode, result.getErrcode());
273235
}
274236

275-
/*
276-
* 特殊字符测试
277-
*/
237+
278238
@Test
279239
public void testSendNotificationWithAppKeyWithSpecialCharacter20(){
280240

@@ -286,9 +246,7 @@ public void testSendNotificationWithAppKeyWithSpecialCharacter20(){
286246
assertEquals(erroCode, result.getErrcode());
287247
}
288248

289-
/*
290-
* 特殊字符测试
291-
*/
249+
292250
@Test
293251
public void testSendNotificationWithAppKeyWithSpecialCharacter21(){
294252

test/cn/jpush/api/FunctionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void sendNotificationWithTagByExtra(){
9494
extra.put("jpush-key","jpush-value");
9595
IOSExtra iosExtra = new IOSExtra(1,"test.mp3");
9696

97-
MessageResult result = jpush.sendNotificationWithAlias(sendNo, tag, msgTitle, msgContent, 0, extra, iosExtra);
97+
MessageResult result = jpush.sendNotificationWithTag(sendNo, tag, msgTitle, msgContent, 0, extra, iosExtra);
9898
assertEquals(resultCode, result.getErrcode());
9999
}
100100

test/cn/jpush/api/SimpleClientFucntionTests.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class SimpleClientFucntionTests {
1818
private String alias = "alias";
1919
private String tag = "tag";
2020
private String imei = "358794047517434";
21+
2122
/*
2223
* 保存离线的时长。秒为单位。最多支持10天(864000秒)。
2324
* 0 表示该消息不保存离线。即:用户在线马上发出,当前不在线用户将不会收到此消息。
@@ -41,6 +42,7 @@ public void sendNotificationWithAppKey(){
4142
assertEquals(resultCode, result.getErrcode());
4243

4344
}
45+
4446
/*
4547
* 发送Alias可以自定义消息
4648
*/
@@ -50,6 +52,7 @@ public void sendNotificationWithAlias(){
5052
assertEquals(resultCode, result.getErrcode());
5153
}
5254

55+
5356
/*
5457
* 发送Tag可以自定义消息
5558
*/
@@ -59,6 +62,7 @@ public void sendNotificationWithTag(){
5962
assertEquals(resultCode, result.getErrcode());
6063
}
6164

65+
6266
/*
6367
* 发送Tag可以自定义消息
6468
*/
@@ -70,7 +74,7 @@ public void sendNotificationWithImei(){
7074

7175

7276
/*
73-
* =========================自定义消息==========================
77+
* =============================================自定义消息==========================
7478
*/
7579

7680
/*

0 commit comments

Comments
 (0)