Djunit NULL when working with a mock-up setreturnvalueat| Mockobjectmanager.addreturnvalue doesn't work.

Source: Internet
Author: User

Recently work to the code for local testing and writing test documents, but my environment is not good oh (at first not very happy to ask seniors directly, or choose to do their own first)
After the computer re-installed JDK, Eclipse,djunit Toolkit ver***, and so on to determine the environment is not a problem, think of it is to ignore the details of a setting, after all, Djunit is directly put the toolkit into the plagins~~ directory of Eclipse
The properties of the Eclipse and the project properties (and the new test project) were finally discovered, and there was no summary of what was on the web, so I started it!

1. Unzip the djunit into the corresponding Plgins directory
2. Restart Eclipse Select Project Right-click Properties-djunit-virtual mocks Objects (the second item) on the first item virtual mocks object, which means that the Djunit tool is enabled in the virtual machine

3. You can use it normally.

As for the specific methods of djunit is still learning to use, left to the next update!

Djunit NULL when working with a mock-up setreturnvalueat| Mockobjectmanager.addreturnvalue doesn't work.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.