You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/09/25 17:35:14 UTC

[commons-vfs] 03/04: Sort members.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit 050b1fb25d9d9a8d4514b04f718ba98d3d4d12e5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Sep 23 11:58:48 2020 -0400

    Sort members.
---
 .../org/apache/commons/vfs2/test/UrlTests.java     | 36 +++++++++++-----------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/UrlTests.java b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/UrlTests.java
index 1602def..0169ae6 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/UrlTests.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/UrlTests.java
@@ -39,6 +39,24 @@ public class UrlTests extends AbstractProviderTestCase {
     }
 
     /**
+     * Tests that unknown files have no content.
+     */
+    public void testUnknownURL() throws Exception {
+        // Try getting the content of an unknown file
+        final FileObject unknownFile = getReadFolder().resolveFile("unknown-file");
+        assertFalse(unknownFile.exists());
+
+        final URLConnection connection = unknownFile.getURL().openConnection();
+        try {
+            connection.getInputStream();
+            fail();
+        } catch (final IOException e) {
+            assertSameMessage("vfs.provider/read-not-file.error", unknownFile, e);
+        }
+        assertEquals(-1, connection.getContentLength());
+    }
+
+    /**
      * Tests url.
      */
     public void testURL() throws Exception {
@@ -92,22 +110,4 @@ public class UrlTests extends AbstractProviderTestCase {
                 f2.getFileSystem());
     }
 
-    /**
-     * Tests that unknown files have no content.
-     */
-    public void testUnknownURL() throws Exception {
-        // Try getting the content of an unknown file
-        final FileObject unknownFile = getReadFolder().resolveFile("unknown-file");
-        assertFalse(unknownFile.exists());
-
-        final URLConnection connection = unknownFile.getURL().openConnection();
-        try {
-            connection.getInputStream();
-            fail();
-        } catch (final IOException e) {
-            assertSameMessage("vfs.provider/read-not-file.error", unknownFile, e);
-        }
-        assertEquals(-1, connection.getContentLength());
-    }
-
 }