unit testing getview

Topics: Actions & Coroutines
Nov 28, 2013 at 2:15 PM
I'm trying to unit test this:

public void OnActivateOverride()
        Caliburn.Micro.Execute.OnUIThread(() => Caliburn.Micro.Coroutine.BeginExecute(SetLoadingTrue().GetEnumerator(), new ActionExecutionContext { View = (DependencyObject)this.GetView() }));


        Caliburn.Micro.Execute.OnUIThread(() => Caliburn.Micro.Coroutine.BeginExecute(SetLoadingFalse().GetEnumerator(), new ActionExecutionContext { View = (DependencyObject)this.GetView() }));

But my This.getView always return null, I now way. But is there a work around?

It returns null because the view isn't created in the unit test.