Question: I need someone to check if my assertions are correct. I did test them and they worked fine, but there are still some concerns that

I need someone to check if my assertions are correct. I did test them and they worked fine, but there are still some concerns that I commented on my test class attached below

I need someone to check if my assertions are correct. I did

test them and they worked fine, but there are still some concerns

And here is my code for the ComplexClass

that I commented on my test class attached below And here is

my code for the ComplexClass And for the ComplexCalculator class eclipse-workspace-CS18284-L File

And for the ComplexCalculator class

Edit Scurce Refatr Navigate Search Preject Rur Winduw Help E Navigator JUnit

& , e-lAEl q, 9, | 1 package test . c st8284.

eclipse-workspace-CS18284-L File Edit Scurce Refatr Navigate Search Preject Rur Winduw Help E Navigator JUnit & , e-lAEl q, 9, | 1 package test . c st8284. calculator ; Finishod after 185.764 scconds 3import static org-junitAssert.; Errors: 0 Failures: 0 1. Use assertNotul) to test thr Complex(doublr, douhle) ranstructorl test.cst8284 calculator.TestComplex [Runner JUnit 4 2. Use asserttquals (double, double, double) to test if geteal) returns the correct value set using the Complex(int, int) constructor 9 3. Use assertEquals(double, double, double) to test if setReal) errectly resets the value set using the Conplex(double, double) censLructor 1 4 . Ikr the no-are cnmlex() constructor, and then use the rral and imaginary setter to set nm. intreer values 12 Then use asser LTrue(boolean) Lo test the validity of your nely-aded equals(in, int) neLhed 1 sing assertTrue(hoolran), test that tun Complrx numbers rreatrd using the Complex(Stringl]) canstructor and thr Conplex(Strine, String) 15 cens tructor give the correct result using the multiply ed Use equals (Complex) to compare the actual and expected result 6.Divide tun Complex nunhers and use thr result to test your equals(ouhle experted, double actual, double drlta) nethod, with delta -.001 import are. junit.Test; 21 22 import cst8284.calculator.Conplex; 3 import cst828 rallator.canplexCalrulatar; 24 25 publ1c class estonplex >126 27 Test hailure Irace #28 public void testLomplextonstructor() { 09 1e 31 Complex now Complrx (3.0, 7.0); asserCNotmill(); 33 Test |14 public void testoetReal(){ Complex nw Capx3, ); assertEquals(c.getReal), 3, 1-5); 16 9 Test 49 public void testsetReal() { Complex-naw Coprx3., .0); c.setReal(); double a c.getReal(); assertFquais(a, A, IF-14); 43 45 Smart Insert 5:73 eclipse-workspace-CS18284-L File Edit Scurce Refatr Navigate Search Preject Rur Winduw Help E Navigator JUnit & , e-lAEl q, 9, | 1 package test . c st8284. calculator ; Finishod after 185.764 scconds 3import static org-junitAssert.; Errors: 0 Failures: 0 1. Use assertNotul) to test thr Complex(doublr, douhle) ranstructorl test.cst8284 calculator.TestComplex [Runner JUnit 4 2. Use asserttquals (double, double, double) to test if geteal) returns the correct value set using the Complex(int, int) constructor 9 3. Use assertEquals(double, double, double) to test if setReal) errectly resets the value set using the Conplex(double, double) censLructor 1 4 . Ikr the no-are cnmlex() constructor, and then use the rral and imaginary setter to set nm. intreer values 12 Then use asser LTrue(boolean) Lo test the validity of your nely-aded equals(in, int) neLhed 1 sing assertTrue(hoolran), test that tun Complrx numbers rreatrd using the Complex(Stringl]) canstructor and thr Conplex(Strine, String) 15 cens tructor give the correct result using the multiply ed Use equals (Complex) to compare the actual and expected result 6.Divide tun Complex nunhers and use thr result to test your equals(ouhle experted, double actual, double drlta) nethod, with delta -.001 import are. junit.Test; 21 22 import cst8284.calculator.Conplex; 3 import cst828 rallator.canplexCalrulatar; 24 25 publ1c class estonplex >126 27 Test hailure Irace #28 public void testLomplextonstructor() { 09 1e 31 Complex now Complrx (3.0, 7.0); asserCNotmill(); 33 Test |14 public void testoetReal(){ Complex nw Capx3, ); assertEquals(c.getReal), 3, 1-5); 16 9 Test 49 public void testsetReal() { Complex-naw Coprx3., .0); c.setReal(); double a c.getReal(); assertFquais(a, A, IF-14); 43 45 Smart Insert 5:73

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!