Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Mission:

You were hired to write and execute complete unit test (white box testing) for MyStringUtils Java class, written by a developer who suddenly left the team. You are provided the source code (MyStrings.java) and you are to write JUnit test cases for it. You are to assume that code comments are correct for what each method is supposed to do and the code is supposed to match it.

Objectives:

Define, implement, and execute complete and thorough unit test on the given Java class (MyStringUtils.java).

Outline of Steps:

1. Fill out the Unit Test approach section in the template, explaining what unit test is all about and it's most important criteria. Make sure you answer and discuss all the questions in the template.

2. Design tests for each method to meet 100% code coverage and reasonable data coverage. Describe these tests in the document using template format given. For this project you want to test methods against the code comments and the code itself.

3. Implement unit test cases in JUnit in a single Java file (e.g. testMyStringsUtils.java)

4. Run the unit test cases and document the actual results in the report for each test case

5. Identify any defects you found running the JUnit and describe them in the report (using the template format) in section 2. Note: You should find a number of defects.

6. Submit both the report file and JUnit source code.

Again, you should first identify and document in your report all the unit tests that should be created (using the example in report). That will give you partial credit - identifying the tests. Then you should implement those test cases in JUnit. Use a single Java file for all your tests! Lastly you should run the test cases and document the actual results and defects you found.

Notes on pulling source code into eclipse

1. Create a new Java project: File->New->Java Project  (ex. MyProject1)

2. Click on "src" under your new project; right click and select import

3. Click on General->File System, then next and browse for where you have the file MyStringUtils.java, select it and click Finish

4. As an alternative you could create a new class MyStringUtils and copy/paste the file content into it.

5. In your project, you will see the source file MyStringUtils.java under src directory.

To add JUnit library to your Eclipse project:

1. Right click on project and select Properties

2. Click on Java Build Path (left side list)

3. Click on "Add Library" button (right side)

4. Select JUnit and click next

5. Choose version 4 of Junit and click Finish

6. The JUnit library will now show under Libraries tab.

7. Click OK

Java, Programming

  • Category:- Java
  • Reference No.:- M91594999
  • Price:- $50

Priced at Now at $50, Verified Solution

Have any Question?


Related Questions in Java

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Object-oriented software development1 introduction 11

OBJECT-ORIENTED SOFTWARE DEVELOPMENT 1. Introduction 1.1 Assignment Requirement 1.2 Deliverables and Structure (what to submit) 1.3 Software Restrictions 1.4 How to score high... 1.5 Assumptions 2. System Requirements 2. ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As