2015-01-26 11:52:50 +01:00
|
|
|
package de.svenkubiak.jpushover;
|
|
|
|
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
|
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
import de.svenkubiak.jpushover.enums.Priority;
|
|
|
|
import de.svenkubiak.jpushover.enums.Sound;
|
|
|
|
|
|
|
|
public class TestJPushover {
|
|
|
|
private static final String USER = "user";
|
|
|
|
private static final String URL_TITLE = "urlTitle";
|
|
|
|
private static final String URL = "url";
|
|
|
|
private static final String TOKEN = "token";
|
|
|
|
private static final String TITLE = "title";
|
|
|
|
private static final String TIMESTAMP = "timestamp";
|
|
|
|
private static final String RETRY = "retry";
|
|
|
|
private static final String MESSAGE = "message";
|
|
|
|
private static final String EXPIRE = "expire";
|
|
|
|
private static final String DEVICE = "device";
|
|
|
|
private static final String CALLBACK = "callback";
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
@Test
|
|
|
|
public void TestValues(){
|
2015-12-08 22:03:44 +01:00
|
|
|
final JPushover push = new JPushover();
|
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.callback(CALLBACK);
|
|
|
|
assertEquals(push.getCallback(), CALLBACK);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.device(DEVICE);
|
|
|
|
assertEquals(push.getDevice(), DEVICE);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.expire(EXPIRE);
|
|
|
|
assertEquals(push.getExpire(), EXPIRE);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.message(MESSAGE);
|
|
|
|
assertEquals(push.getMessage(), MESSAGE);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.priority(Priority.HIGH);
|
|
|
|
assertEquals(push.getPriority(), Priority.HIGH);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.retry(RETRY);
|
|
|
|
assertEquals(push.getRetry(), RETRY);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.sound(Sound.ALIEN);
|
|
|
|
assertEquals(push.getSound(), Sound.ALIEN);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.timestamp(TIMESTAMP);
|
|
|
|
assertEquals(push.getTimestamp(), TIMESTAMP);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.title(TITLE);
|
|
|
|
assertEquals(push.getTitle(), TITLE);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.token(TOKEN);
|
|
|
|
assertEquals(push.getToken(), TOKEN);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.url(URL);
|
|
|
|
assertEquals(push.getUrl(), URL);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.urlTitle(URL_TITLE);
|
|
|
|
assertEquals(push.getUrlTitle(), URL_TITLE);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
2015-01-26 11:52:50 +01:00
|
|
|
push.user(USER);
|
|
|
|
assertEquals(push.getUser(), USER);
|
2015-12-08 22:03:44 +01:00
|
|
|
|
|
|
|
push.html();
|
|
|
|
assertEquals(push.getHtml(), true);
|
2015-01-26 11:52:50 +01:00
|
|
|
}
|
|
|
|
}
|