Generating JUnit stubs for new methods in existing class in Eclipse

前端 未结 3 1374
难免孤独
难免孤独 2021-02-05 05:55

This question is tangentially related to How can I create JUnit stub methods in eclipse? but it doesn\'t answer my specific question.

Assuming you have an existing JUnit

3条回答
  •  无人共我
    2021-02-05 06:38

    1. Install the MoreUnit extension from the MarketPlace.
    2. Open the package hierarchy panel.
    3. Navigate down to the class that you've modified.
    4. Right click on the new method.
    5. Select "Generate Test". The generated stub will appear in your ClassTest file.

提交回复
热议问题