Unit Testing
There are 4 entries for the tag
Unit Testing
Problem: If you are using Visual Studio testing tools and you open your testrunconfig file to update or turn on code coverage it closes/crashes immediately. Workaround: If your solution contains a Silverlight project (not Silverlight Class Library, these are ok for some reason) or a WSSF project (Web Services Software Factory) you can unload the project (right-click project in Solution Explorer, select “Unload Project”). Once you have done this your code coverage will work and you can open the property window for Code Coverage in your testrunconfig file. Tags: Unit Testing, Visual Studio 2008 SP 1, Silverlight
I'm in the process of creating the world's most complex “Hello World” Silverlight application. Hopefully, for once, I'll see it through to the end and also post the source and an insightful blog entry to help everybody who's struggling to do the same. Anyone who follows my blog knows that I don't always follow through on a series to the end. But, “I can dream can't I?”. Anyhow, I've taken the recent release of Prism v2, which introduced Silverlight support, to dig in and get to know both Prism and Silverlight. As background, I have one production WFP application under...
I hit a road block today writing some tests which were dependent upon another class's property indexer. When trying to do the following using Moq: 1: [TestMethod] 2: public void Test1() 3: { 4: Mock<HttpContextBase> context = new Mock<HttpContextBase>(); 5: 6: Object actual = null; 7: ...
Wither you are a TDD purest or not, if you are developing with Entity Framework and testability is important to you, then you have tried some workaround or applied some pattern to make testing possible in your project. When you have a class or method which depends on any external resource it is important to create some sort of abstraction in order to remove a dependency upon that resource so you can effectively test your code. The client I am currently working for has chosen to create a repository class which takes an ObjectContext argument in the constructor. The repository...