예제 #1
0
        public void OaiLoad()
        {
            Given_Dialog();
            Given_Platforms();
            Given_Architectures();
            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("(None)", platformNames[0].Text);
            Assert.AreEqual("0", dlg.AddressTextBox.Text);
            mr.VerifyAll();
        }
예제 #2
0
        public void Oai_AddressSelected_OkDisabled()
        {
            Given_Dialog();
            Given_Platforms();
            Given_Architectures();
            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();
        }
예제 #3
0
        public void Oai_OkPressed_ReturnSelectedThings()
        {
            Given_Dialog();
            Given_Platforms();
            Given_Architectures();
            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);
        }