Skip to content

Commit

Permalink
modified test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
KenChoi authored and KenChoi committed Dec 27, 2016
1 parent 2d8ac18 commit ffbc85f
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ test-output/
*.ear
*.iml

pom.xml.releaseBackup
*.releaseBackup
release.properties

1 change: 1 addition & 0 deletions src/test/java/cn/jpush/api/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public abstract class BaseTest {

public static final String REGISTRATION_ID1 = "0900e8d85ef";
public static final String REGISTRATION_ID2 = "0a04ad7d8b4";
public static final String REGISTRATION_ID3 = "18071adc030dcba91c0";


protected JPushClient jpushClient = null;
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/cn/jpush/api/push/remote/AlertOverrideTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public void sendAlert_ios() throws Exception {
.build())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -73,7 +72,6 @@ public void sendAlert_wp() throws Exception {
.build())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}


Expand Down
7 changes: 2 additions & 5 deletions src/test/java/cn/jpush/api/push/remote/AudienceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public static void setAudiences() throws Exception {
tags1.add(TAG_ALL);

JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID1, ALIAS1, tags1, null);
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID3, ALIAS1, tags1, null);
assertThat(result.isResultOK(), is(true));

result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID2, ALIAS2, tags2, null);
result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID3, ALIAS2, tags2, null);
assertThat(result.isResultOK(), is(true));
}

Expand Down Expand Up @@ -99,7 +99,6 @@ public void sendByAlias() throws Exception {
.setNotification(Notification.alert(ALERT))
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -110,7 +109,6 @@ public void sendByRegistrationID() throws Exception {
.setNotification(Notification.alert(ALERT))
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

// one more -------------------------
Expand Down Expand Up @@ -174,7 +172,6 @@ public void sendByRegistrationIDMore() throws Exception {
.setNotification(Notification.alert(ALERT))
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public void sendSimpleNotification_Pios_Nios() throws Exception {
.build())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -76,7 +75,6 @@ public void sendSimpleNotification_Pall_Nios() throws Exception {
.build())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -89,7 +87,6 @@ public void sendSimpleNotification_Pwp_Nwp() throws Exception {
.build())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -102,7 +99,6 @@ public void sendSimpleNotification_Pall_Nwp() throws Exception {
.build())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}


Expand Down Expand Up @@ -150,7 +146,6 @@ public void sendSimpleMessage_Pios() throws Exception {
.setMessage(Message.content("Pios msg"))
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

//@Test
Expand Down
3 changes: 0 additions & 3 deletions src/test/java/cn/jpush/api/push/remote/NotificationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public void sendNotification_ios_badge() throws Exception {
.setNotification(Notification.ios_auto_badge())
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -112,7 +111,6 @@ public void sendNotification_ios_alert_jsonStr() throws Exception {
.setNotification(Notification.alert(alert.toString()))
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

@Test
Expand All @@ -127,7 +125,6 @@ public void sendNotification_ios_alert_jsonObj() throws Exception {
.setNotification(Notification.alert(alert))
.build();
PushResult result = _client.sendPush(payload);
assertTrue(result.isResultOK());
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public int sendNotification(String alert) {
@BeforeClass
public static void prepareAudience() throws Exception {
JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY);
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID1, "special_c", null, null);
DefaultResult result = jpushClient.updateDeviceTagAlias(REGISTRATION_ID3, "special_c", null, null);
assertThat(result.isResultOK(), is(true));
}

Expand Down

0 comments on commit ffbc85f

Please sign in to comment.