Beispiel #1
0
        public void Mfi_OpenBinary_SwitchToInitialPhase()
        {
            Given_Loader();
            Given_MainFormInteractor();
            diagnosticSvc.Stub(d => d.ClearDiagnostics());
            brSvc.Stub(d => d.Clear());
            Given_DecompilerInstance();
            dcSvc.Stub(d => d.Decompiler = null);
            Given_SavePrompt(true);
            mr.ReplayAll();

            When_CreateMainFormInteractor();
            interactor.OpenBinary("floxie.exe");
            Assert.AreSame(interactor.CurrentPhase, interactor.InitialPageInteractor);
            Assert.IsTrue(((FakeInitialPageInteractor)interactor.InitialPageInteractor).OpenBinaryCalled);
        }
Beispiel #2
0
        public void Mfi_OpenBinary_SwitchToInitialPhase()
        {
            Given_Loader();
            Given_MainFormInteractor();
            diagnosticSvc.Stub(d => d.ClearDiagnostics());
            brSvc.Stub(d => d.Clear());
            Given_DecompilerInstance();
            dcSvc.Stub(d => d.Decompiler = null);
            Given_SavePrompt(true);
            fsSvc.Stub(f => f.MakeRelativePath("foo.dcproject", "foo.exe")).Return("foo.exe");
            fsSvc.Stub(f => f.MakeRelativePath(Arg <string> .Is.Equal("foo.dcproject"), Arg <string> .Is.Null)).Return(null);
            mr.ReplayAll();

            When_CreateMainFormInteractor();
            interactor.OpenBinary("floxie.exe");
            Assert.AreSame(interactor.CurrentPhase, interactor.InitialPageInteractor);
            Assert.IsTrue(((FakeInitialPageInteractor)interactor.InitialPageInteractor).OpenBinaryCalled);
        }