Installation of Junit Hamcrest and Eclemma

Source: Internet
Author: User

JUnit: Installing the JUnit installation with Eclipse is a simple matter of pouring two packages into a project, but I would like to use MAVEN to build the project in eclipse, but maybe the eclipse version is too low to use JUNIT4. So I chose to do it using idea, first of all using the idea maven to build the project, and adding JUnit's package dependency to the Pom.xml file: <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>

In this way, JUnit is installed directly.

Hamcrest is easier, directly in the use of the class file plus import static org.hamcrest.matchers.*;

The overlay test of idea does not require a Eclemma installation, it can be added directly to the edit configuration.

Test with edge Length (1,1,1) (1,1,0) (2,3,4), test results passed, and coverage reached 100%

Installation of Junit Hamcrest and Eclemma

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.