lbownik commented on a change in pull request #3894:
URL: https://github.com/apache/netbeans/pull/3894#discussion_r838765335



##########
File path: 
platform/openide.util/test/unit/src/org/openide/util/BaseUtilitiesTest.java
##########
@@ -111,7 +112,86 @@ public void testIsJavaIdentifier() throws Exception {
         assertFalse(BaseUtilities.isJavaIdentifier("some.thing"));
     }
 
+    
//--------------------------------------------------------------------------
+    public void test_toFile_throwsNullPonter_whenArgumentIsNull()
+            throws Exception {
+
+        try {
+            toFile(null);
+            fail();
+        } catch (final NullPointerException e) {
+            return;
+        }
+    }
+
+    
//--------------------------------------------------------------------------
+    public void test_toFile_returnsFile_whenGivenUnixPath()

Review comment:
       I started with this because I wanted to shave off 2 seconds of execution 
from the "testFileURI" test (I wanted to start with something simple just to 
warm up). Then I realized that "testFileURI" is kind of messy , so I started to 
dissecting it into smaller pieces. The new tets methods are intended to replase 
the "testFileURI" test. I intend to remove "testFileURI" in next PR after 
succesful nightly build (so that there is proof that both old and new test 
pass).

##########
File path: 
platform/openide.util/test/unit/src/org/openide/util/BaseUtilitiesTest.java
##########
@@ -126,8 +206,10 @@ public void testFileURI() throws Exception {
             assertEquals(new File("/some/path"), BaseUtilities.toFile(new 
URI("file:///some/path")));
             assertEquals(new File("/some/path"), BaseUtilities.toFile(new 
URI("file:/some/path/")));
         }
+        //the following code seems not to have sense at all

Review comment:
       Because it tests URI class and not toURI method - even though it call 
it. 
   It seems to be a test of JVM implementation itself - I have no idea what for.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to