Am working on coded UI tests for my web application. Was trying to isolate repository method calls the same way I'm doing in unit and integration tests, i.e. using Microsoft.Fakes framework. But it seems for the UI tests Fakes are not working, because real method is still called instead of a shim. Without isolation UI test results in affecting the database (for example adding a new user when testing the registration process) which makes it not to be reusable. So was wondering whether it is possible to fake/mock those methods and avoid setting up test database and test web site each time I need to run those coded UI tests.
Didn't find much useful information related to this issue, so will be grateful for any help.
In case of a need here is a link to a very simple example: https://www.dropbox.com/s/m6les7pmto14njq/TestCodedUITest.zip That is a VS 2012 solution with one class library (containing a class with method which simply throws an exception), one web application (containing a page with one button on it which calls mentioned method) and finally one coded UI test which contains the shim of that method and simply opens IE, navigates to the page and clicks the button.