示例#1
0
        public override void Setup()
        {
            fBase         = new BaseWindowStub();
            fSourceRecord = new GDMSourceRecord(fBase.Context.Tree);

            fDialog       = new SourceEditDlg(fBase);
            fDialog.Model = fSourceRecord;
            fDialog.Show();
        }
示例#2
0
        public static void SourceEditDlg_Handler(SourceEditDlg dlg)
        {
            GDMSourceRecord srcRecord = dlg.Model;

            SelectTab("tabsData", dlg, 2);

            // repositories
            Assert.AreEqual(0, srcRecord.RepositoryCitations.Count);
            RecordSelectDlgTests.SetCreateItemHandler(fFormTest, TaskEditDlgTests.TaskAdd_Mini_Handler);
            ClickToolStripButton("fRepositoriesList_ToolBar_btnAdd", dlg);
            Assert.AreEqual(1, srcRecord.RepositoryCitations.Count);

            SelectSheetListItem("fRepositoriesList", dlg, 0);
            SetModalFormHandler(fFormTest, MessageBox_YesHandler);
            ClickToolStripButton("fRepositoriesList_ToolBar_btnDelete", dlg);
            Assert.AreEqual(0, srcRecord.RepositoryCitations.Count);

            ClickButton("btnAccept", dlg);
        }