public void OaiLoad() { Given_Dialog(); Given_RawFiles(); Given_Platforms(); Given_Architectures(); Expect_RawFilesDatasourceSet(); Expect_PlatformDataSourceSet(); Expect_ArchDatasourceSet(); mr.ReplayAll(); var interactor = new OpenAsInteractor(); interactor.Attach(dlg); dlg.Raise(x => x.Load += null, dlg, EventArgs.Empty); Assert.AreEqual(2, archNames.Count()); Assert.AreEqual(2, platformNames.Length); Assert.AreEqual("(Unknown)", rawFileNames[0].Text); Assert.IsNull(rawFileNames[0].Value); Assert.AreEqual("(None)", platformNames[0].Text); Assert.AreEqual("0", dlg.AddressTextBox.Text); mr.VerifyAll(); }
public void Oai_AddressSelected_OkDisabled() { Given_Dialog(); Given_RawFiles(); Given_Platforms(); Given_Architectures(); Expect_RawFilesDatasourceSet(); Expect_PlatformDataSourceSet(); Expect_ArchDatasourceSet(); mr.ReplayAll(); var interactor = new OpenAsInteractor(); interactor.Attach(dlg); When_Dialog_Loaded(); When_FileSelected("foo.exe"); Assert.IsFalse(dlg.OkButton.Enabled); mr.VerifyAll(); }
public void Oai_OkPressed_ReturnSelectedThings() { Given_Dialog(); Given_RawFiles(); Given_Platforms(); Given_Architectures(); Expect_RawFilesDatasourceSet(); Expect_PlatformDataSourceSet(); Expect_ArchDatasourceSet(); mr.ReplayAll(); var interactor = new OpenAsInteractor(); interactor.Attach(dlg); When_Dialog_Loaded(); mr.VerifyAll(); Assert.AreEqual(2, archNames.Count()); Assert.AreEqual(2, platformNames.Length); Assert.AreEqual("(None)", platformNames[0].Text); }