Unit test ViewModels using IoC

I have looked at the sample "Simple MDI with Screen Collections". I have added functionality to use the unity IoC container in the sample registered like in the "customizing bootstrapper sample". Thus my implementation of ShellViewModel.OpenTab
looks like:

Generally speaking, the IoC static gateway is intended to be used by the framework itself and similar framework extensions, and you shoudld avoid using it inside your application code. You should consider having a function injected into the view model that
needs to do the creation. Something like this:

This allows you to provide your own Fun<TabViewModel> at test time and enables the ShellViewModel to declare exactly what it needs to create. If this won't meet your needs, you can actually set the IoC public field funcs to your own method implementations
designed to work in tests.

Ok, tanks for the very quick reply. I did understand that IoC might not be intended to use by user code, that is hinted somewhere in the tutorial/blog. But nothing about how to do it instead. I could of course have come up with some sort of solution myself.
However, better to ask the question rather than guessing.