NUnit doesn't work well with Assert.AreEqual

前端 未结 4 1650
面向向阳花
面向向阳花 2021-01-17 13:29

I\'m new to unit testing and NUit in particular. I\'m just typing some examples from the book which refers to Java and JUnit. But I\'m using C# instead.

The problem

4条回答
  •  [愿得一人]
    2021-01-17 14:35

    You can write framework agnostic asserts using a library called Should. It also has a very nice fluent syntax which can be used if you like fluent interfaces. I had a blog post related to the same.

    http://nileshgule.blogspot.com/2010/11/use-should-assertion-library-to-write.html

提交回复
热议问题