Tagunit tests

Ask a geek: mocking third party service in Selenium tests of an MVC application

A

We received the following Ask-a-geek question from Patrick: I have the following scenario. MVC Application using Ninject and Moq for the unit tests. We do some additional Tests using Selenium which testes JS etc. So the scenario we want to test is, that in a TestMethod we start IIS Express with the MVC project. Start selenium and do the clicks, check the results. That works all perfect. Now we have a call to a third party webservice from our repository. In our unittests we used MOQ to mock that...

How to find misplaced or misnamed unit tests with NDepend

H

In my current project, we do a lot of refactoring to keep the source code as simple and understandable as possible. This involves a lot of renaming of classes and moving classes between namespaces to structure the code in a better understandable way (here is explained how we structure our code). Sometimes, this results in unit tests not renamed or moved along with the production classes they test.
Therefore, I wrote some NDepend queries that show us these misplaced or misnamed test classes.

Recent Posts