This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 77181

Summary: J2MEUNIT - don't generate tests for private methods
Product: javame Reporter: Lukas Hasik <lhasik>
Component: JUnitAssignee: Jiri Prazak <bohemius>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 77184    

Description Lukas Hasik 2006-05-31 20:00:31 UTC
060531
-the generator generates test methods even for private methods in tested class

    private void initialize() {
    }
    public void testinitialize() {
        System.out.println("initialize");
        hello.HelloMidlet instance = new hello.HelloMidlet();
        instance.initialize();
        
        //TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }

compilation ends with error, of course ;)

MobileApplicationJ2MEunit\src\hello\HelloMidletTest.java:16: initialize() has
private access in hello.HelloMidlet
        instance.initialize();
1 error
Comment 1 Lukas Hasik 2006-06-23 15:09:24 UTC
moving to mobility component
Comment 2 Jiri Prazak 2006-06-26 14:46:38 UTC
fixed
Comment 3 Lukas Hasik 2006-06-27 14:07:06 UTC
verified in jars from 0627
Comment 4 Lukas Hasik 2006-07-12 14:14:19 UTC
verified in 5.5 Beta2 candidate