public override void Setup()
        {
            fBase = new BaseWindowStub();

            fDialog = new RelationshipCalculatorDlg(fBase);
            fDialog.Show();
        }
        public static void RelationshipCalculatorDlg_Handler(string name, IntPtr ptr, Form form)
        {
            RelationshipCalculatorDlg dlg = (RelationshipCalculatorDlg)form;
            IBaseContext baseContext = dlg.Base.Context;

            Assert.IsTrue(baseContext.Tree.RecordsCount > 1);

            GDMIndividualRecord iRec1 = baseContext.Tree.XRefIndex_Find("I1") as GDMIndividualRecord;
            Assert.IsNotNull(iRec1);
            Assert.AreEqual("Ivanov Ivan Ivanovich", GKUtils.GetRecordName(baseContext.Tree, iRec1, false));
            GDMIndividualRecord iRec2 = baseContext.Tree.XRefIndex_Find("I2") as GDMIndividualRecord;
            Assert.IsNotNull(iRec2);
            Assert.AreEqual("Ivanova Maria Petrovna", GKUtils.GetRecordName(baseContext.Tree, iRec2, false));

            WFAppHost.TEST_MODE = true; // FIXME: dirty hack

            RecordSelectDlgTests.SetSelectItemHandler(0);
            ClickButton("btnRec1Select", form);
            RecordSelectDlgTests.SetSelectItemHandler(1);
            ClickButton("btnRec2Select", form);

            var txtResult = new TextBoxTester("txtResult", form);
            // default is not Russian culture
            Assert.AreEqual("Ivanova Maria Petrovna is wife of Ivanov Ivan Ivanovich", txtResult.Text); // :D

            ClickButton("btnClose", form);
        }