Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You need to design test cases for the following scenarios using function assertEquals: (a) A test case that passes the test (1 point). (b) A

image text in transcribed

You need to design test cases for the following scenarios using function assertEquals: (a) A test case that passes the test (1 point). (b) A test case that fails the test (1 point). (c) Using @ignore annotation to run your test cases (1 point). (d) Creating a minus function in the class Calculate.java , which returns var1 - var2, and then creating suite tests for two functions in Calculate.java (1 point).

Question: Given the class Calculate.java as follow: Calculate.java package com.junit; public class Calculate t public int sum(int var1, int var2) System.out.println( "Adding values: " varl +" var2); return varl + var2: You need to design test cases for the following scenarios using function assertEquals: (a) A test case that passes the test (1 point). (b) A test case that fails the test (1 point). (c) Using @ignore annotation to run your test cases (1 point). (d) Creating a minus function in the class Calculate.java, which returns var var2, and then creating suite tests for two functions in Calculate java (1 point)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago

Question

How can we visually describe our goals?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago