Пример #1
0
 public void Setup()
 {
     mr         = new MockRepository();
     sp         = new ServiceContainer();
     uiSvc      = mr.StrictMock <IDecompilerShellUiService>();
     uiPrefsSvc = mr.StrictMock <IUiPreferencesService>();
     dlgFactory = mr.StrictMock <IDialogFactory>();
     uiSvc.Stub(u => u.SetContextMenu(null, 0)).IgnoreArguments();
     uiSvc.Replay();
     uiPrefsSvc.Stub(u => u.Styles).Return(new Dictionary <string, UiStyle>());
     uiPrefsSvc.Replay();
     sp.AddService(typeof(IDecompilerShellUiService), uiSvc);
     sp.AddService(typeof(IDialogFactory), dlgFactory);
     sp.AddService(typeof(IUiPreferencesService), uiPrefsSvc);
     addrBase = Address.Ptr32(0x1000);
 }
Пример #2
0
 public void Setup()
 {
     mr         = new MockRepository();
     sp         = new ServiceContainer();
     uiSvc      = mr.StrictMock <IDecompilerShellUiService>();
     uiPrefsSvc = mr.StrictMock <IUiPreferencesService>();
     dlgFactory = mr.StrictMock <IDialogFactory>();
     uiSvc.Stub(u => u.GetContextMenu(MenuIds.CtxMemoryControl)).Return(new ContextMenu());
     uiSvc.Stub(u => u.GetContextMenu(MenuIds.CtxDisassembler)).Return(new ContextMenu());
     uiSvc.Replay();
     uiPrefsSvc.Replay();
     sp.AddService(typeof(IDecompilerShellUiService), uiSvc);
     sp.AddService(typeof(IDialogFactory), dlgFactory);
     sp.AddService(typeof(IUiPreferencesService), uiPrefsSvc);
     addrBase = Address.Ptr32(0x1000);
 }
        public void Setup()
        {
            mr = new MockRepository();
            sp = new ServiceContainer();
            uiSvc = mr.StrictMock<IDecompilerShellUiService>();
            uiPrefsSvc = mr.StrictMock<IUiPreferencesService>();
            dlgFactory = mr.StrictMock<IDialogFactory>();
            uiSvc.Stub(u => u.GetContextMenu(MenuIds.CtxMemoryControl)).Return(new ContextMenu());
            uiSvc.Stub(u => u.GetContextMenu(MenuIds.CtxDisassembler)).Return(new ContextMenu());
            uiSvc.Replay();
            uiPrefsSvc.Stub(u => u.Styles).Return(new Dictionary<string, UiStyle>());
            uiPrefsSvc.Replay();
            sp.AddService(typeof(IDecompilerShellUiService), uiSvc);
			sp.AddService(typeof(IDialogFactory), dlgFactory);
            sp.AddService(typeof(IUiPreferencesService), uiPrefsSvc);
            addrBase = Address.Ptr32(0x1000);
        }