Tag Archives: unittest

Effort: Unhandled exception while trying to initialize the content of Table

We use Effort with the CsvDataLoader in our integration tests. After adding a new data file we got an exception. On the forum every thread ended with something like “my bad” or “never mind”. Looking closer to my csv file showed the error: a typo … Continue reading

Posted in Test | Tagged , , , | Leave a comment

Entity Framework Fake ObjectContext Realization Tool

With Effort (Entity Framework Fake ObjectContext Realization Tool) I can create integration tests for the datalayer in my project. The tool has an Entity Framework provider that works on an in-memory database. This means I can call SaveChanges without mocking it or having a dependency on a … Continue reading

Posted in Development | Tagged , , | Leave a comment

Be careful when using mocked repository

One of the software development best practices is to use interfaces and dependency injection. But be careful when using a mocked version of your repository. With FakeDbSet an InMemory IDbSet can be created for unit testing purposes. During setup you’d … Continue reading

Posted in Test | Tagged , , , , , | Leave a comment

MSTest Code Coverage with runsettings

I’ve been fine tuning my code coverage runsettings file for some time now and I’m ready to share it with the world. You can use it in Visual Studio by setting the test settings file. In MSBuild you can specify … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Ignore integration tests when provider is missing

As an integration test I’ve written some unit tests for my MsAccess Data Access Layer. The provider I’m using is OleDb. It will be installed on every desktop machine, but not on our build server. The build fails because of … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Visual Studio Shims and Fakes

Microsoft Visual Studio 2013 includes Fakes (Premium and above) to isolate existing code. This involves intercepting calls to the framework and rerouting them to Shims. These Shims are created by right clicking a reference and selecting “Add Fakes Assembly”. But … Continue reading

Posted in Development | Tagged , | Leave a comment

Week roundup

Last week recap and links: Shim for System.Environment.MachineName on msdn; you’ll need to edit the fakes configuration file Visual Studio 2015 Final Release Event on June 20th Docker Visual Studio Extension [ video] on Azure friday Image courtesy of kanate … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment