public void Mfi_OpenBinary_SwitchToInitialPhase() { Given_Loader(); Given_MainFormInteractor(); diagnosticSvc.Stub(d => d.ClearDiagnostics()); brSvc.Stub(d => d.Clear()); Given_DecompilerInstance(); Given_LoadPreferences(); dcSvc.Stub(d => d.Decompiler = null); Given_XmlWriter(); 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); uiSvc.Stub(u => u.ShowSaveFileDialog("foo.dcproject")).Return("foo.dcproject"); sbSvc.Expect(s => s.SetText("")); mr.ReplayAll(); When_CreateMainFormInteractor(); interactor.OpenBinary("floxie.exe"); mr.VerifyAll(); Assert.AreSame(interactor.CurrentPhase, interactor.InitialPageInteractor); Assert.IsTrue(((FakeInitialPageInteractor)interactor.InitialPageInteractor).OpenBinaryCalled); }