xUnit : Assert two List are equal?

前端 未结 4 1996
长发绾君心
长发绾君心 2020-12-05 01:33

I\'m new to TDD and xUnit so I want to test my method that looks something like:

List DeleteElements(this List a, List b         


        
4条回答
  •  旧时难觅i
    2020-12-05 02:20

    In the current version of XUnit (1.5) you can just use

    Assert.Equal(expected, actual);

    The above method will do an element by element comparison of the two lists. I'm not sure if this works for any prior version.

提交回复
热议问题