Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started