runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Come up with a proposal for using given-when-then model in corefx unit tests

Open Sridhar-MS opened this issue 11 years ago • 3 comments

http://martinfowler.com/bliki/GivenWhenThen.html

Sridhar-MS avatar Jul 15 '15 20:07 Sridhar-MS

Personally I like the "Arrange, Act, Assert" model: http://xp123.com/articles/3a-arrange-act-assert/

In particular, our team likes this book for designing good unit tests: "The Art of Unit Testing" http://www.amazon.com/The-Art-Unit-Testing-examples/dp/1617290890/ref=dp_ob_title_bk

It has helped us think about what a good unit test is and how to write them correctly.

/cc @CIPop @SidharthNabar

davidsh avatar Jul 15 '15 22:07 davidsh

I have been reading about Arrange-Act-Assert model too. Though I have not personally used it. I would love to see some samples and arguments for it.

Sridhar-MS avatar Jul 15 '15 23:07 Sridhar-MS

GWT model is very restrictive for corefx unit testing especially when it comes to Theory based tests with InlineData or MemberData. Hence closing this issue. There will be ongoing efforts to produce a unified test-naming convention for corefx tests.

Sridhar-MS avatar Sep 09 '15 17:09 Sridhar-MS