public void Setup() { mr = new MockRepository(); mockFactory = new MockFactory(mr); var platform = mockFactory.CreatePlatform(); var imageMap = new SegmentMap(Address32.Ptr32(0x05)); program = new Program(imageMap, platform.Architecture, platform); interactor = new CombinedCodeViewInteractor(); var uiPreferencesSvc = mr.Stub<IUiPreferencesService>(); var uiSvc = mr.Stub<IDecompilerShellUiService>(); var styles = new Dictionary<string, UiStyle>() { { UiStyles.CodeWindow, new UiStyle { Background = new SolidBrush(Color.White), } } }; uiPreferencesSvc.Stub(u => u.Styles).Return(styles); var sc = new ServiceContainer(); sc.AddService<IUiPreferencesService>(uiPreferencesSvc); sc.AddService<IDecompilerShellUiService>(uiSvc); interactor.SetSite(sc); }