Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

CS4723/5123 Course Project I In this assignment, you are required to use JUnit test framework (http://junit.org/) to write unit test cases for the following Java classes. Note that only the 12...

1 answer below »
CS4723/5123 Course Project I

In this assignment, you are required to use JUnit test framework (http://junit.org/) to write unit test cases for the following Java classes. Note that only the 12 specified methods need to be tested. The links for downloading the corresponding packages are given below the class name.

org.apache.commons.mail.Email: http://xywang XXXXXXXXXXnet/commons-email-1.3.2-src.zip Email addBcc(String... emails) Email addCc(String email) void addHeader(String name, String value) Email addReplyTo(String email, String name) void buildMimeMessage() String getHostName() Session getMailSession() Date getSentDate() int getSocketConnectionTimeout() String send() Email setFrom(String email) void updateContentType(String aContentType)

Deliverables You will work individually and write a JUnit test class with test methods to test the above class. Please submit your test code, with all required dependencies (JUnit Framework, Mock Framework if required, the tested code, and other dependencies required to run the test code) to blackboard. The test code should be commented appropriately. Please name your package as [lastName]_[abc123 ID].zip. Evaluation Criterion The assignment accounts for 25 points of the total 100 points of the course. 7 points will be given to all students who have submitted test code that compiles and have no runtime errors. Then the assignment will be evaluated on the following aspects: (1) the proper implementation of setup, teardown, and assertions (3 points) (2) the proper usage of test doubles, such as dummies, stubs, fake objects, and mocks (3 points) (3) reasonable test coverage, over 70% on all methods tested (12 points). Note that you lose 1 point for each method you did not reach 70% coverage.

Required Plugins ECL Emma http://www.eclemma.org/installation.html Required Code dependency Apache Email requires two dependency jar files to be correctly compiled. They are in the zip file and are also available at http://xywang XXXXXXXXXXnet/Email_dependency.zip Junit Code Template An exemplar Junit project zip is available at http://xywang XXXXXXXXXXnet/JunitExample.zip Due Date The due date of assignment I is the end of the day of Oct. 8th.

Answered 113 days After May 18, 2022

Solution

Robert answered on Sep 09 2022
76 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here