vendredi 9 septembre 2016

Assert.AreEqual gives error even while parameters are the same

I have been trying to unit test a block of code which has not been working as expected. I am passing in by reference.

public void ResetToDefaultUnitTest()
{
    AppReusables AppReusables = new AppReusables(driver);
    Assert.AreEqual(AppConstants.ResetButton,
        AppReusables.ResetToDefault(AppConstants.ResetButton));
}

It gives this error message:

Assert.AreEqual failed. Expected: "blala" Actual: <>

It actually displays as empty, not "<>". What do I need to do?

Aucun commentaire:

Enregistrer un commentaire