Why is the unit code failing when results are the same?



I have to compare 2 xmls for unit testing and if they match I have to pass the test. I used the XMLDiff patch technique and stored the result into a boolean "bIdentical". After that did the following:



string result="";
if(bIdentical)
result="true";
else
result="false";
object expectedFinal = "true";
object actualFinal = result;
Assert.AreEqual(expectedFinal, actualFinal);
Assert.Inconclusive("Verify the correctness of this test method.");


Why is this failing though expectedEqual is the same as actualFinal? I debugged the code and saw both have the same string "true". Still its executing the line Assert.Inconclusive and test fails. please advice.


No comments:

Post a Comment