Assert.AreEqual failing in unit test

后端 未结 10 1348
挽巷
挽巷 2021-01-18 14:54

I have the following unit test:

string MtrlCode = \"0\";
Assessment target = new Assessment(MtrlCode);

List EdgeCaseSymbolCodes = new List<         


        
10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-18 15:29

    This looks like a case of reference versus value comparison. If you have two different instances of objects with the same property values, by default they will never be 'equal' using default comparisons. You have to compare the values of the objects. Try writing code to compare the values of each instance.

提交回复
热议问题