Blog All Machine Learning Business Analysis Consultancy Artificial Intelligence DevOps Solutions Architect Delivery Manager Rozwój w PGS Data science Cloud Software Development Quality Assurance Design News Events .NET mocking tips & tricks unit testing Mocking Linq to Sql DataContext In one of our projects, we are using Linq to Sql to work with database. It is really nice to use, because it allows you to query a database using Linq. Everything is fine, until you want to unit test your code... How to mock DataContext? Not so easy. DataContext… .NET mocking unit testing Mocking out method parameters in Moq Recently I had a situation, when I was writing an unit test and I need to mock a method with an 'out' parameter. I had an import functionality where the import service was using a parser for processing input data before doing actual import. I wanted to test whether the… .NET mocking unit testing Mocking with Moq There are many mocking frameworks in the .NET world. Probably, the best known is Rhino Mocks. I used it and I found it a little tricky. I had to browse its documentation many times to find out how to do something. Recently, through some technical reading, I have found another… Popular posts Mocking Linq to Sql DataContext Mocking out method parameters in Moq Mocking with Moq 1