Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2225

Create/Update JUnit tests fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.0
    • None
    • java - JUnit
    • None

    Description

      Generation of method access level specific tests Test Case 

      • Steps:
        • For the project JUnitSampleProjectAnt:
          1. In the Projects panel, under Source Packages > methodaccess double click the file Methods.java to open it in the editor.
          2. From the Tools menu select Create/Update Tests.
          3. In the Create/Update Tests dialog there are three checkboxes named:
            • Public
            • Protected
            • Package Private
      • If, and only if, Public was checked then method testPublicMethod() will be generated.
      • If, and only if, Protected was checked then method testProtectedMethod() will be generated.
      • If, and only if, Package Private was checked then method testPackagePrivateMethod() will be generated.

      Acutal Results:

      *(for ** both JUnitSampleProjectAnt and ** JUnitSampleProjectMaven)**

      If you only select Public the testPublicMethod() is created, if you then unselect Public and select Protected the testProtectedMethod() is created but the testPublcMethod() remains.  

      If you delete the MethodsT.java file between tests everything works fine.   In general it appears the tests are not updated, ie new tests are added but old tests are not removed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            abcampbell Bailey Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: