Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        public void Oai_NoFileSelected_OkDisabled()
        {
            Given_Dialog();
            Given_Platforms();
            Given_Architectures();
            Expect_PlatformDataSourceSet();
            Expect_ArchDatasourceSet();
            mr.ReplayAll();

            var interactor = new OpenAsInteractor();

            interactor.Attach(dlg);

            When_Dialog_Loaded();

            Assert.IsFalse(dlg.OkButton.Enabled);
            mr.VerifyAll();
        }
Ejemplo n.º 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);
        }