public void Setup()
        {
            mr              = new MockRepository();
            services        = new ServiceContainer();
            declarationForm = mr.Stub <IDeclarationForm>();
            textBox         = new FakeTextBox();
            declarationForm.Stub(f => f.TextBox).Return(textBox);
            declarationForm.Stub(f => f.ShowAt(new Point()));
            declarationForm.Stub(f => f.Hide());
            declarationForm.Stub(f => f.Dispose());
            var dlgFactory = mr.Stub <IDialogFactory>();

            dlgFactory.Stub(f => f.CreateDeclarationForm()).Return(declarationForm);
            services.AddService <IDialogFactory>(dlgFactory);
            mr.ReplayAll();
            interactor = new DeclarationFormInteractor(services);
            var mem        = new MemoryArea(Address32.Ptr32(0x10), new byte[40]);
            var seg        = new ImageSegment(".text", mem, AccessMode.ReadWrite);
            var segmentMap = new SegmentMap(Address32.Ptr32(0x05), seg);
            var arch       = new X86ArchitectureFlat32();
            var platform   = new Win32Platform(null, arch);

            program          = new Program(segmentMap, arch, platform);
            program.ImageMap = segmentMap.CreateImageMap();
        }
        public void Setup()
        {
            mr          = new MockRepository();
            services    = new ServiceContainer();
            commentForm = mr.Stub <IDeclarationForm>();
            textBox     = new FakeTextBox();
            commentForm.Stub(f => f.TextBox).Return(textBox);
            commentForm.Stub(f => f.ShowAt(new Point()));
            commentForm.Stub(f => f.Hide());
            commentForm.Stub(f => f.Dispose());
            var dlgFactory = mr.Stub <IDialogFactory>();

            dlgFactory
            .Stub(f => f.CreateCommentForm())
            .Return(commentForm);
            services.AddService <IDialogFactory>(dlgFactory);
            mr.ReplayAll();
            interactor = new CommentFormInteractor(services);
            program    = new Program();
        }