예제 #1
0
        public void Test_EnterDataDatesAndApply()
        {
            // Dates isn't empty
            Assert.AreEqual(fResearchRecord, fDialog.Research);

            var txtName = new TextBoxTester("txtName", fDialog);

            txtName.Enter("sample text");

            var txtStartDate = new MaskedTextBoxTester("txtStartDate", fDialog);

            txtStartDate.Enter("01.01.2000");

            var txtStopDate = new MaskedTextBoxTester("txtStopDate", fDialog);

            txtStopDate.Enter("20.02.2000");

            // The links to other records can be added or edited only in MainWinTests
            // (where there is a complete infrastructure of the calls to BaseWin.ModifyX)

            ClickButton("btnAccept", fDialog);

            Assert.AreEqual("sample text", fResearchRecord.ResearchName);
            Assert.AreEqual("01 JAN 2000", fResearchRecord.StartDate.StringValue);
            Assert.AreEqual("20 FEB 2000", fResearchRecord.StopDate.StringValue);
        }
예제 #2
0
        public void Test_EnterDataDatesAndApply()
        {
            Assert.AreEqual(fTaskRecord, fDialog.Task);

            var txtPriority = new ComboBoxTester("txtPriority", fDialog);

            txtPriority.Select(1);

            var txtStartDate = new MaskedTextBoxTester("txtStartDate", fDialog);

            txtStartDate.Enter("01.01.2000");

            var txtStopDate = new MaskedTextBoxTester("txtStopDate", fDialog);

            txtStopDate.Enter("20.02.2000");

            var cmbGoalType = new ComboBoxTester("cmbGoalType", fDialog);

            for (GKGoalType gt = GKGoalType.gtIndividual; gt <= GKGoalType.gtOther; gt++)
            {
                cmbGoalType.Select((int)gt);
            }

            ClickButton("btnAccept", fDialog);

            Assert.AreEqual(GKResearchPriority.rpLow, fTaskRecord.Priority);
            Assert.AreEqual("01 JAN 2000", fTaskRecord.StartDate.StringValue);
            Assert.AreEqual("20 FEB 2000", fTaskRecord.StopDate.StringValue);
        }
        public void Test_EnterDataDatesAndApply()
        {
            Assert.AreEqual(fCommunicationRecord, fDialog.Communication);

            var txtName = new TextBoxTester("txtName");

            txtName.Enter("sample text");

            var txtDate = new MaskedTextBoxTester("txtDate", fDialog);

            txtDate.Enter("20.02.2000");

            ClickButton("btnAccept", fDialog);

            Assert.AreEqual("sample text", fCommunicationRecord.CommName);
            Assert.AreEqual("20 FEB 2000", fCommunicationRecord.Date.StringValue);
        }
예제 #4
0
        public static void EnterMaskedText(string name, Form form, string value)
        {
            var textBox = new MaskedTextBoxTester(name, form);

            textBox.Enter(value);
        }