Why prefix with “unit of work” when the its name already appears in the test class name? This is redundant.
PS: by the way, “unit under test” is probably a better name than “unit of work”
PS: by the way, “unit under test” is probably a better name than “unit of work”
>You usually have at least a number of tests for each method you are testing, and you are usually testing a number of methods in one test fixture (since you usually have a test fixture per class tested). This leads to the requirement that your test should also reflect the name of the method begin tested, not only the requirements from it.
> A unit of work is a use case in the system that startes with a public method and ends up with one of three types of results (...)
I use the same naming as well, and I really like it.
using var uow = UnitOfWorkContainer.Begin();
await SomeDep.Save(foo); // internally uses the uow's transaction
await SomeOtherDep.Save(foo2);
uow.Complete();