Question: Can anyone help as to why my test cases is failing. My class implementation looks correct. public boolean addE (Edge e) { /** * TODO:

Can anyone help as to why my test cases is failing. My class implementation looks correct.

Can anyone help as to why my test cases is failing. Myclass implementation looks correct. public boolean addE (Edge e) { /** *TODO: implement the adde function; */ Message msg; boolean resultCheck = false;

public boolean addE (Edge e) { /** * TODO: implement the adde function; */ Message msg; boolean resultCheck = false; // check for src and dest for (int i = 0; i e = new Edge("1", "2"); /** * add an exist edge */ boolean success = graph.addE(e); Assert.assertEquals(false, success); /** * add a new edge */ Edge e1 = new Edge("1", "4"); success = graph.addE(41); Assert.assertEquals(true, success); } Failure Trace '! java.lang. AssertionError. expected: but was: at graph.D GraphTest.test_addE(DGraphTest.java:102) public boolean addE (Edge e) { /** * TODO: implement the adde function; */ Message msg; boolean resultCheck = false; // check for src and dest for (int i = 0; i e = new Edge("1", "2"); /** * add an exist edge */ boolean success = graph.addE(e); Assert.assertEquals(false, success); /** * add a new edge */ Edge e1 = new Edge("1", "4"); success = graph.addE(41); Assert.assertEquals(true, success); } Failure Trace '! java.lang. AssertionError. expected: but was: at graph.D GraphTest.test_addE(DGraphTest.java:102)

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!