I’ve been shown a lovely little utility for testing with JUnit 4.11 whereby one can have a list of items performed as part of the single unit test.
First set add the annotations you see below and set your inputs and expected outputs. (Arrange and Assert)
Then create a constructor and some static variables to store each Tuple
Then define your single unit test (the business logic is your Action)
That’s it, a really nice way to have a single unit test that can be run multiple times with different parameters.
If you would like to do the same sort of testing in .net you have some choices to make.
you could use NUnit and use the TestCaseAttribute
Of if like me you prefer MSTest then you can opt for a data driven unit test.
See this vs2013 page (has worked at least since vs2010) :