You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/03/13 19:15:30 UTC

[GitHub] matthiasblaesing commented on issue #419: [NETBEANS-408] Fix AntJUnitManagerProviderTest test at junit.ant.ui module.

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:
users@infra.apache.org


With regards,
Apache Git Services

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

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