public void Creates_The_ViewModel_Instance_With_A_Custom_Factory() { ViewModelLocationProvider.SetViewModelFactory((viewModelType) => ReflectionDelegateFactory.CreateConstructor <object>(viewModelType)()); var viewModel = ViewModelLocationProvider.CreateViewModelInstance(typeof(MyViewAViewModel)); Assert.IsNotNull(viewModel); Assert.AreEqual(typeof(MyViewAViewModel), viewModel.GetType()); ViewModelLocationProvider.SetViewModelFactoryToDefault(); }