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 113144 - regeneration not working on the first try
Summary: regeneration not working on the first try
Status: VERIFIED DUPLICATE of bug 113313
Alias: None
Product: javame
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: luky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-18 09:52 UTC by luky
Modified: 2008-09-26 11:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description luky 2007-08-18 09:52:27 UTC
When you add a method to the class you want to test and try to regenerate junit chnages (new method) is not generated 
on the first attempt, you must try to regenerate twice to get the corect result

Steps:
1) Create junit test from a class
2) Add a method to the class
3) try to create test again (regenerate) - nothing happens
4) try to create test again (regenerate) - new method is added to the test
Comment 1 luky 2007-08-22 17:06:04 UTC
Fixed. Pretty big fix, should be tested properly. generation of startUp and tearDown should work as well
Comment 2 luky 2007-08-22 17:07:13 UTC
forgot to mark it as fixed
Comment 3 Lukas Hasik 2007-09-05 16:34:57 UTC
seems that it works but the generated code is strange

-the default is everywhere in switch and the generated test method...
<generated code>

    /*
     * /*Test of testLukasovaNovaMetoda method, of class DifferentReturnTypes.*/ */ public void testLukasovaNovaMetoda()
throws AssertionFailedException {
        System.out.println("LukasovaNovaMetoda");
        DifferentReturnTypes instance = new DifferentReturnTypes();
        instance.LukasovaNovaMetoda();
        fail("The test case is a prototype.");
    }


    public void test(int testNumber) throws Throwable {
        switch (testNumber) {
            default:
        testDoubleMethod();
                break;
            default:
        testShortMethod();
                break;
            default:
        testFloatMethod();
                break;
            default:
        testIntegerMethod();
                break;
            default:
        testBooleanMethod();
                break;
            default:
        testByteMethod();
                break;
            default:
        testLukasovaNovaMetoda();
                break;
            default:
        testVoidMethod();
                break;
            default:
        testIntMethod();
                break;
            default:
        testObjectMethod();
                break;
            default:
        testLongMethod();
                break;
            default:
        testStringMethod();
                break;
            default:
        testCharMethod();
                break;
            default:
        testIntArrayMethod();
                break;
            default:
        testAJesteNovejsiMetoda();
                break;
            default:
                break;
        }
    }    

</generated code>
Comment 4 luky 2007-09-05 16:38:53 UTC
Known behaviour, problem is in retouche. They have an P2 issue opened for that

*** This issue has been marked as a duplicate of 113313 ***
Comment 5 Ivan Sidorkin 2008-09-26 11:13:33 UTC
verified duplicate