Thomas Levesque 1/17/2016

Automatically inject fakes in test fixture with FakeItEasy

Read Original

This technical article demonstrates a FakeItEasy feature for unit testing: automatically initializing fake dependencies and the system under test (SUT) by marking them with [Fake] and [UnderTest] attributes and calling Fake.InitializeFixture. It shows example code using xUnit, explains the benefits of reduced boilerplate, and notes limitations like constructor-only injection.

Automatically inject fakes in test fixture with FakeItEasy

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week