diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-11-28 01:54:42 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-11-28 01:54:42 +0100 |
| commit | 05e5d126293d682788f720816e5b010b11eaa829 (patch) | |
| tree | 4050fce30d98cd4563f43ccdf9f6198769f48430 /tests/src | |
| parent | 7fbeb61433d7297eb05aff9c762b555239f59490 (diff) | |
| download | cgeo-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.java | 29 |
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(); + } + +} |
