We have done research to Unit Testing in our company. In my company we make custom .NET, Sitefinity and especially Sitecore. We have made successfully Unit Tests for custom .NET and Sitefinity, but we could not really get to useful tests. For mocking we use Telerik JustMock and the build-in TestExplorer in Visual Studio. The reason for this was we had to mock to much and that led to useless tests almost. Actually Sitecore is a database with pages/content for each item.
Now we are going to invest time in a further research, but some experience with Unit Testing with Sitecore will be very useful. So here are my question:
- Are there more people who encountered this problem in their company?
- What approach did you choose in this situation? Or: what would you suggest be doing in our situation? Should we give up or can we get it working and in what way?
(I have already asked a question about Sitecore Unit Testing, but that was for a good tutorial how to do this: Unit Testing Sitecore using NUnit, serializing content; the answer of Shriroop was useful.)