aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2014-11-28 01:54:42 +0100
committerSamuel Tardieu <sam@rfc1149.net>2014-11-28 01:54:42 +0100
commit05e5d126293d682788f720816e5b010b11eaa829 (patch)
tree4050fce30d98cd4563f43ccdf9f6198769f48430 /tests/src
parent7fbeb61433d7297eb05aff9c762b555239f59490 (diff)
downloadcgeo-05e5d126293d682788f720816e5b010b11eaa829.zip
cgeo-05e5d126293d682788f720816e5b010b11eaa829.tar.gz
cgeo-05e5d126293d682788f720816e5b010b11eaa829.tar.bz2
Add GCLogin tests
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/GCLoginTest.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCLoginTest.java b/tests/src/cgeo/geocaching/connector/gc/GCLoginTest.java
new file mode 100644
index 0000000..b03da4c
--- /dev/null
+++ b/tests/src/cgeo/geocaching/connector/gc/GCLoginTest.java
@@ -0,0 +1,29 @@
+package cgeo.geocaching.connector.gc;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import cgeo.geocaching.enumerations.StatusCode;
+
+import org.apache.commons.lang3.StringUtils;
+
+import junit.framework.TestCase;
+
+public class GCLoginTest extends TestCase {
+
+ final GCLogin instance = GCLogin.getInstance();
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ assertThat(instance.login()).isEqualTo(StatusCode.NO_ERROR);
+ }
+
+ public void testHomeLocation() {
+ assertThat(StringUtils.isNotBlank(GCLogin.retrieveHomeLocation())).isTrue();
+ }
+
+ public void testAvatar() {
+ assertThat(instance.downloadAvatarAndGetMemberStatus()).isNotNull();
+ }
+
+}