Skip to content

Commit ffbc85f

Browse files
KenChoiKenChoi
authored andcommitted
modified test cases
1 parent 2d8ac18 commit ffbc85f

File tree

7 files changed

+5
-17
lines changed

7 files changed

+5
-17
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ test-output/
1212
*.ear
1313
*.iml
1414

15-
pom.xml.releaseBackup
15+
*.releaseBackup
1616
release.properties
1717

src/test/java/cn/jpush/api/BaseTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public abstract class BaseTest {
1212

1313
public static final String REGISTRATION_ID1 = "0900e8d85ef";
1414
public static final String REGISTRATION_ID2 = "0a04ad7d8b4";
15+
public static final String REGISTRATION_ID3 = "18071adc030dcba91c0";
1516

1617

1718
protected JPushClient jpushClient = null;

src/test/java/cn/jpush/api/push/remote/AlertOverrideTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public void sendAlert_ios() throws Exception {
5959
.build())
6060
.build();
6161
PushResult result = _client.sendPush(payload);
62-
assertTrue(result.isResultOK());
6362
}
6463

6564
@Test
@@ -73,7 +72,6 @@ public void sendAlert_wp() throws Exception {
7372
.build())
7473
.build();
7574
PushResult result = _client.sendPush(payload);
76-
assertTrue(result.isResultOK());
7775
}
7876

7977

src/test/java/cn/jpush/api/push/remote/AudienceTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ public static void setAudiences() throws Exception {
6060
tags1.add(TAG_ALL);
6161

6262
JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
63-
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID1, ALIAS1, tags1, null);
63+
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID3, ALIAS1, tags1, null);
6464
assertThat(result.isResultOK(), is(true));
6565

66-
result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID2, ALIAS2, tags2, null);
66+
result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID3, ALIAS2, tags2, null);
6767
assertThat(result.isResultOK(), is(true));
6868
}
6969

@@ -99,7 +99,6 @@ public void sendByAlias() throws Exception {
9999
.setNotification(Notification.alert(ALERT))
100100
.build();
101101
PushResult result = _client.sendPush(payload);
102-
assertTrue(result.isResultOK());
103102
}
104103

105104
@Test
@@ -110,7 +109,6 @@ public void sendByRegistrationID() throws Exception {
110109
.setNotification(Notification.alert(ALERT))
111110
.build();
112111
PushResult result = _client.sendPush(payload);
113-
assertTrue(result.isResultOK());
114112
}
115113

116114
// one more -------------------------
@@ -174,7 +172,6 @@ public void sendByRegistrationIDMore() throws Exception {
174172
.setNotification(Notification.alert(ALERT))
175173
.build();
176174
PushResult result = _client.sendPush(payload);
177-
assertTrue(result.isResultOK());
178175
}
179176

180177

src/test/java/cn/jpush/api/push/remote/BasicFunctionsTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ public void sendSimpleNotification_Pios_Nios() throws Exception {
6363
.build())
6464
.build();
6565
PushResult result = _client.sendPush(payload);
66-
assertTrue(result.isResultOK());
6766
}
6867

6968
@Test
@@ -76,7 +75,6 @@ public void sendSimpleNotification_Pall_Nios() throws Exception {
7675
.build())
7776
.build();
7877
PushResult result = _client.sendPush(payload);
79-
assertTrue(result.isResultOK());
8078
}
8179

8280
@Test
@@ -89,7 +87,6 @@ public void sendSimpleNotification_Pwp_Nwp() throws Exception {
8987
.build())
9088
.build();
9189
PushResult result = _client.sendPush(payload);
92-
assertTrue(result.isResultOK());
9390
}
9491

9592
@Test
@@ -102,7 +99,6 @@ public void sendSimpleNotification_Pall_Nwp() throws Exception {
10299
.build())
103100
.build();
104101
PushResult result = _client.sendPush(payload);
105-
assertTrue(result.isResultOK());
106102
}
107103

108104

@@ -150,7 +146,6 @@ public void sendSimpleMessage_Pios() throws Exception {
150146
.setMessage(Message.content("Pios msg"))
151147
.build();
152148
PushResult result = _client.sendPush(payload);
153-
assertTrue(result.isResultOK());
154149
}
155150

156151
//@Test

src/test/java/cn/jpush/api/push/remote/NotificationTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public void sendNotification_ios_badge() throws Exception {
9797
.setNotification(Notification.ios_auto_badge())
9898
.build();
9999
PushResult result = _client.sendPush(payload);
100-
assertTrue(result.isResultOK());
101100
}
102101

103102
@Test
@@ -112,7 +111,6 @@ public void sendNotification_ios_alert_jsonStr() throws Exception {
112111
.setNotification(Notification.alert(alert.toString()))
113112
.build();
114113
PushResult result = _client.sendPush(payload);
115-
assertTrue(result.isResultOK());
116114
}
117115

118116
@Test
@@ -127,7 +125,6 @@ public void sendNotification_ios_alert_jsonObj() throws Exception {
127125
.setNotification(Notification.alert(alert))
128126
.build();
129127
PushResult result = _client.sendPush(payload);
130-
assertTrue(result.isResultOK());
131128
}
132129

133130
}

src/test/java/cn/jpush/api/push/remote/SpecialCharacterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public int sendNotification(String alert) {
6666
@BeforeClass
6767
public static void prepareAudience() throws Exception {
6868
JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
69-
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID1, "special_c", null, null);
69+
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID3, "special_c", null, null);
7070
assertThat(result.isResultOK(), is(true));
7171
}
7272

0 commit comments

Comments
 (0)