diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b2954544..c4ea55e2 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="14" + android:versionName="0.4.1-alpha" > ourselves + if (location.equals(href)) { // -> ourselves referenced = this; } else { // -> about a member diff --git a/test/src/at/bitfire/davdroid/test/URIUtilsTest.java b/test/src/at/bitfire/davdroid/test/URIUtilsTest.java index 558523a6..549643b2 100644 --- a/test/src/at/bitfire/davdroid/test/URIUtilsTest.java +++ b/test/src/at/bitfire/davdroid/test/URIUtilsTest.java @@ -17,11 +17,6 @@ public class URIUtilsTest extends InstrumentationTestCase { baseURI = new URI(BASE_URI); } - - public void testIsSame() throws URISyntaxException { - assertTrue(URIUtils.isSame(new URI(ROOT_URI + "my@email/"), new URI(ROOT_URI + "my%40email/"))); - } - public void testSanitize() { assertEquals("/my%40email.com/dir", URIUtils.sanitize("/my@email.com/dir")); assertEquals("my%3Afile.vcf", URIUtils.sanitize("my:file.vcf")); diff --git a/test/src/at/bitfire/davdroid/webdav/test/WebDavResourceTest.java b/test/src/at/bitfire/davdroid/webdav/test/WebDavResourceTest.java index 20ecfa8a..322c61e6 100644 --- a/test/src/at/bitfire/davdroid/webdav/test/WebDavResourceTest.java +++ b/test/src/at/bitfire/davdroid/webdav/test/WebDavResourceTest.java @@ -82,10 +82,14 @@ public class WebDavResourceTest extends InstrumentationTestCase { } public void testPropfindCurrentUserPrincipal() throws IOException, HttpException { - assertTrue(davCollection.propfind(HttpPropfind.Mode.CURRENT_USER_PRINCIPAL)); + davCollection.propfind(HttpPropfind.Mode.CURRENT_USER_PRINCIPAL); assertEquals("/dav/principals/users/test", davCollection.getCurrentUserPrincipal()); - assertFalse(simpleFile.propfind(HttpPropfind.Mode.CURRENT_USER_PRINCIPAL)); + try { + simpleFile.propfind(HttpPropfind.Mode.CURRENT_USER_PRINCIPAL); + fail(); + } catch(InvalidDavResponseException ex) { + } assertNull(simpleFile.getCurrentUserPrincipal()); } @@ -130,10 +134,9 @@ public class WebDavResourceTest extends InstrumentationTestCase { WebDavResource redirection = new WebDavResource(new URI(ROBOHYDRA_BASE + "redirect"), false); try { redirection.get(); + fail(); } catch (HttpException e) { - return; } - fail(); } public void testGet() throws URISyntaxException, IOException, HttpException { @@ -160,10 +163,9 @@ public class WebDavResourceTest extends InstrumentationTestCase { // should fail on an existing file try { davExistingFile.put(SAMPLE_CONTENT, PutMode.ADD_DONT_OVERWRITE); + fail(); } catch(PreconditionFailedException ex) { - return; } - fail(); } public void testPutUpdateDontOverwrite() throws IOException, HttpException { @@ -173,10 +175,9 @@ public class WebDavResourceTest extends InstrumentationTestCase { // should fail on a non-existing file try { davNonExistingFile.put(SAMPLE_CONTENT, PutMode.UPDATE_DONT_OVERWRITE); + fail(); } catch(PreconditionFailedException ex) { - return; } - fail(); } public void testDelete() throws IOException, HttpException { @@ -186,10 +187,9 @@ public class WebDavResourceTest extends InstrumentationTestCase { // should fail on a non-existing file try { davNonExistingFile.delete(); + fail(); } catch (NotFoundException e) { - return; } - fail(); }