Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

Harvard University Partial Codebase for JSON Comparison Java Program Project

Harvard University Partial Codebase for JSON Comparison Java Program Project

Harvard University Partial Codebase for JSON Comparison Java Program Project

Question Description

Problem Statement

Create a set of unit tests using JUnit5 for provided classes to find some bugs and test the

correctness of the code.

Background

You have inherited some buggy code for comparing JSON objects. Your boss fired their previous

developer because the former developer did not do any testing. Your boss has hired you to

write a comprehensive set of tests for part of the codebase. For now, she just wants you to

create the test suite.

The code is supposed to determine if two JSON objects are the same. JSON, the (JavaScript

Object Notation) is a widely-used encoding format that makes it easy to exchange data. JSON is

a text-based (human readable) format, which makes it ideal for many applications as well as

easy to debug.

You will be provided with a partial codebase for JSON comparison, a specification, a starter

JUnit5 test class, and a list of classes for which you are to create unit tests. Your job is to create

the test suite and identify the bugs. You will fix the bugs in a later assignment so do not spend

time fixing them now.

For this assignment, you will need to research the JSON format on the web. For example:

https://www.json.org. A brief summary is provided in the specification, but you are encouraged

to do more in-depth research. Task

1. Observe the main method in JSim.java . Note that you can also create a JSONScanner from a

string which will be helpful for creating good unit tests.

2. Create a set of unit tests using JUnit5 for the following classes:

• ArrayValue.java

• ObjectValue.java

• Pair.java

• PrimitiveValue.java

• Value.java

3. Use a separate test class for each of the above target classes. Some sample empty tests

have been provided. For each test class

a. You can decide if you want to use white-box testing, black-box testing, or grey-box

testing.

b. Create as many tests for each method of each class as needed. Recall from class

that we discussed ways of determining how many tests we would need. By

analysing the code (white-box testing) or the specification (black-box testing).

c. Each test should provide an appropriate message if it fails.

d. Use good formatting and documentation in your tests, just like for any source code.

4. All the test classes should compile and be runnable in IntelliJ. If your test classes do not

compile, you will receive 0 on the assignment.

5. Record all detected errors in a file called errors.txt in the docs directory. You do not

need to debug, just record the method and class that failed. Each error should have the

following information:

a. Class name

b. Method name

c. Test name that caught the error

d. Message that the test method generated

This information will be used to assess the number of errors found by your tests.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20