Syndication

News

     

Archives

Miscelaneous

Programming

October 2008 - Posts

I kept getting a "Activation Error: Code 0x8007232b DNS Name does not exist" error whenever I tried to activate Windows 2008 Standard (which has been running great on my X61 laptop so far as the host OS!).

Weird procedure you have to follow to activate:

Activate Windows Server 2008 RTM (MSDN Subscriber Downloads version)

Read full article

Posted by Daniel Cazzulino

  • Follow all the tips from Windows 2008 Workstation site. Microsoft has a KB article also that is useful.
  • Get Windows Live Messenger bare MSI from Softpedia (it's a MS-signed installer, worked just fine for me)
  • How to get Windows Live Writer on Windows 2008: this was a bit trickier, and involves importing a few registry keys (just copy the registry keys to a .reg file and import it).
    1. First you need a machine with WLW installed. Copy the entire folder to the new machine. I copied it to %ProgramFiles%\Windows Live\Writer, which is where it'd go if I could run the proper installer....

Read full article

Posted by Daniel Cazzulino
Filed under:

 

I realized that I never blogged about this cool feature contributed by Slava to Moq-Contrib.

Auto-mocking containers was an idea originally (IIRC) from the guys at Eleutian, later on picked up by Jeremy Miller with Rhino Mocks and StructureMap.

The wiki document Slava put together on Automocking is a fantastic overview. Basically, you can have an (Autofac-powered) container create your objects under test with all its dependencies injected as mocks:...

Read full article

Posted by Daniel Cazzulino
Filed under: ,

In my very recent previous post I said "mocking and stubbing easier than ever", but actually forgot to mention the stubbing part :S.

This one is not new for users of moq-contrib, but we decided to move this to the core Moq library as we get the question on how to stub properties often enough... :)

It's actually rather simple and easy to implement just by using Moq external API, but as a facility, here's what you can do:...

Read full article

Posted by Daniel Cazzulino
Filed under: , ,

I've just released a new version of Moq which contains a few bug fixes but two extremely useful features: recursive mocks and mocked default values.

Recursive mocks

Quite often you have a root mock object from which other mocks should "hang" through property accesses, such as HttpContextBase.Response: you want the response object returned to also be a mock.

Setting such hierarchies before this release was quite verbose:...

Read full article

Posted by Daniel Cazzulino
Filed under: , ,

There's been some excitement lately about the introduction of a common IServiceLocator that all major DI containers apparently will provide.

Unless you're building an "extensible framework leveraging framework consumer selectable IoC containers", don't sweat it too much, the interface was NOT created for you!

Let me reiterate: adding a dependency on IServiceLocator to your classes is NOT a good idea. When you do so, instead of an explicit and self documenting dependency on an external object, you're tunneling this locator that now hides to the class consumers which are its true dependencies. This is BAD, as it requires users to go to your class documentation (and hope it's updated) rather than its constructor to see what it needs to operate. If you've done any kind of work extending VS you know how bad this can get....

Read full article

Posted by Daniel Cazzulino
Filed under: ,
More Posts