public void Setup() { // mouse + keyboard _keyboardSignal = Mock.Of <ISignal <EventArgs <ITextControl> > >(); _mouseSignal = Mock.Of <ISignal <TextControlMouseEventArgs> >(); // ctrl click _testTarget = Names.Type("System.Int32, mscore, 4.0.0.0"); // window var window = Mock.Of <ITextControlWindow>(); Mock.Get(window).Setup(w => w.Keyboard).Returns(_keyboardSignal); Mock.Get(window).Setup(w => w.MouseUp).Returns(_mouseSignal); // textcontrol _textControl = Mock.Of <ITextControl>(); var textControlManager = Mock.Of <ITextControlManager>(); Mock.Get(textControlManager).Setup(tcManager => tcManager.TextControls) .Returns( new CollectionEvents <ITextControl>( TestLifetime, "this can't be empty") { _textControl }); Mock.Get(_textControl).Setup(tc => tc.Window).Returns(window); // navigation utils _navigationUtils = Mock.Of <INavigationUtils>(); SetTarget(_testTarget); SetLocation(_method1); _uut = new NavigationEventGenerator( TestRSEnv, TestMessageBus, TestDateUtils, textControlManager, _navigationUtils, TestLifetime, TestThreading); }