Assert.AreEqual failing in unit test

后端 未结 10 1356
挽巷
挽巷 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:30

    If you want to compare to List you can create a void function with that code Snippet.

    Assert.AreEqual(response.Count, acceptedResponse.Count,"Diferent list length");
                for (int i = 0; i < acceptedResponse.Count; i++)
                {
                    Assert.AreEqual(response[i],acceptedResponse[i]);
                }
    

提交回复
热议问题