matthiasblaesing commented on issue #419: [NETBEANS-408] Fix 
AntJUnitManagerProviderTest test at junit.ant.ui module.
URL: 
https://github.com/apache/incubator-netbeans/pull/419#issuecomment-372785746
 
 
   I would not fix it this way. A call to new can't return NULL, so the assert 
will never be null. I would either remove the unittest or at least check some 
more:
   
   ```diff
        @Test
        public void testRegisterNodeFactory() {
   -        System.out.println("registerNodeFactory");
            AntJUnitManagerProvider instance = new AntJUnitManagerProvider();
            instance.registerNodeFactory();
   -        // TODO review the generated test code and remove the default call 
to fail.
   -        fail("The test case is a prototype.");
   +        TestRunnerNodeFactory nodeFactory = 
Manager.getInstance().getNodeFactory();
   +        assertNotNull(nodeFactory);
   +        
assertTrue(AntJUnitTestRunnerNodeFactory.class.isAssignableFrom(nodeFactory.getClass()));
        }
   ```
   
   This at least proves, that the nodeFactory is updated. Still not much, but 
at least a bit :-)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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

Reply via email to