do { Engine.BlogAbout(".NET","Silverlight"); } while ( alive );  

Mark Monster

Mark Monster  

Posts Tagged ‘Mocking’

What needs to be done to make DynamicProxy work in Silverlight?

.NET CLR to Silverlight CLRSome time ago I sort of complained there’s no Mocking Framework available for Silverlight. This has a lot to do with the not being available Castle’s DynamicProxy for Silverlight. So I did some analyzing on DynamicProxy if it’s possible to make it work under Silverlight.

Read the rest of this entry »

Thinking about Silverlight and Mocking

There are quite some Mocking frameworks available. But sadly no one is ported to Silverlight, yet. I know about the porting of NUnit to Silverlight, but while working on Unit tests for the "Silverlight Networking through Javascript" library I found out there’s no Mocking framework yet to support the Silverlight runtime.

I would like to see some support for Silverlight from either Moq or Rhino Mocks. That’s because I like the way those Mocking frameworks work. I think they both make use of Castle’s DynamicProxy, so that’s another thing that first needs to become Silverlight enabled.

I’m sure more people thought about Mocking in a Silverlight runtime but didn’t find a solution too. I’m interested if anyone started to port one of the above Mocking frameworks to Silverlight. I’m not even totally sure if it’s possible but at least a part of Reflection.Emit exists.

What are anyone’s thoughts about Mocking in Silverlight?

Book review: Test Driven by Lasse Koskela

Some time ago I did the technical review of the Manning Book Test Driven by Lasse Koskela. The book is available since October 10th.

The book is devided in three rough parts: Part 1, A TDD primer; Part 2,  Applying TDD to specific technologies; Part 3, Building products with acceptance TDD.

Part 1, A TDD primer: This part is about Testing in general and covers refactoring and patterns as well. Everything is written with Test Driven Development in mind. So don’t expect all possible refactorings and patterns covered here.

Part 2, Applying TDD to specific technologies: This part covers testing on specific technologies. Where the first part can help people start testing, the second part will help people continue testing even if the more complicated tests need to be written. Specially complex testing on Web components, data access, etc.

Part 3, Building products with acceptance TDD: The last part covers more on acceptance testing. I haven’t got any experience with automated acceptance testing but this part covers it quite well.

Although this book has some influence from the Java world almost everything can be applied within other technology worlds as well, like .NET, Ruby and PHP. I like this book and will use it every once in a while to keep myself focused.

Mocking with Rhino Mocks: Expecting a method not to be called

Mocking with Rhino Mocks: Expecting a method not to be called

This morning I thought about trying out some Mocking with Rhino Mocks. First of all I was having some little trouble of testing method’s that returned void. Oren Eini suggested somewhere to make use of method chaining, so I changed it to use method chaining.

So what’s next? Expecting a method not to be called. For example the situation on line 12: I expect the WriteLog method with parameter EventLogEntryType.SuccesAudit not to be called. I think the test I wrote should work.

Read the rest of this entry »