blob: ded0a1a388c98b48a452c09119b232e70d51883e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package cgeo.geocaching.connector.trackable;
import static org.assertj.core.api.Assertions.assertThat;
import cgeo.geocaching.Trackable;
import junit.framework.TestCase;
public class UnknownTrackableConnectorTest extends TestCase {
private static UnknownTrackableConnector getConnector() {
return new UnknownTrackableConnector();
}
public static void testCanHandleTrackable() throws Exception {
assertThat(getConnector().canHandleTrackable("TB1234")).isFalse();
}
public static void testGetUrl() throws Exception {
try {
getConnector().getUrl(new Trackable());
fail("IllegalStateException expected");
} catch (final IllegalStateException e) {
// empty
}
}
public static void testSearchTrackable() throws Exception {
assertThat(getConnector().searchTrackable("TB1234", null, null)).isNull();
}
public static void testIsLoggable() throws Exception {
assertThat(getConnector().isLoggable()).isFalse();
}
public static void testGetTrackableCodeFromUrl() throws Exception {
assertThat(getConnector().getTrackableCodeFromUrl("http://www.sometrackable.com/1234")).isNull();
}
public static void testGetUserActions() throws Exception {
assertThat(getConnector().getUserActions()).isEmpty();
}
}
|