vieiro commented on a change in pull request #3894:
URL: https://github.com/apache/netbeans/pull/3894#discussion_r838534419
##########
File path:
platform/openide.util/test/unit/src/org/openide/util/BaseUtilitiesTest.java
##########
@@ -38,65 +39,65 @@ public BaseUtilitiesTest(String name) {
@Override
protected void setUp() throws Exception {
super.setUp();
- BaseUtilities.resetOperatingSystem ();
+ BaseUtilities.resetOperatingSystem();
originalOsName = System.getProperty("os.name");
}
-
+
@Override
protected void tearDown() throws Exception {
System.setProperty("os.name", originalOsName);
super.tearDown();
}
- public void testGetOperatingSystemWinNT () {
- System.setProperty ("os.name", "Windows NT");
+ public void testGetOperatingSystemWinNT() {
+ System.setProperty("os.name", "Windows NT");
//assertEquals ("System.getProperty (os.name) returns Windows NT",
"Windows NT", System.getProperty ("os.name"));
- assertEquals ("Windows NT recognized as OS_WINNT",
BaseUtilities.OS_WINNT, BaseUtilities.getOperatingSystem ());
+ assertEquals("Windows NT recognized as OS_WINNT",
BaseUtilities.OS_WINNT, BaseUtilities.getOperatingSystem());
Review comment:
Reformatting existing code makes reviews harder. We don't want to
reformat existing code without a real need. Otherwise we'll be revieweing
reformats for each one of the NetBeans committers.
##########
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:
Why?
##########
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:
Is this test already included in some of the other tests? Why is is
neccessary?
--
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