Exemplo n.º 1
0
        public void TestDescriptionFound()
        {
            ClsPosition position   = new ClsPosition();
            bool        Found      = false;
            bool        OK         = true;
            int         positionID = 1;

            Found = position.Find(positionID);
            if (position.Description != "Develop and deploy software.")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemplo n.º 2
0
        public void TestPositionNameFound()
        {
            ClsPosition position   = new ClsPosition();
            bool        Found      = false;
            bool        OK         = true;
            int         PositionID = 1;

            Found = position.Find(PositionID);
            if (position.PositionName != "Software Engineer")
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemplo n.º 3
0
        public void TestSalaryFound()
        {
            ClsPosition position   = new ClsPosition();
            bool        Found      = false;
            bool        OK         = true;
            int         PositionID = 1;

            Found = position.Find(PositionID);
            if (position.Salary != 35000.00M)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemplo n.º 4
0
        //[TestMethod]
        public void TestPositionIDFound()
        {
            ClsPosition position = new ClsPosition();

            bool Found      = false;
            bool OK         = true;
            int  PositionID = 1;

            Found = position.Find(PositionID);

            if (position.PositionID != 1)
            {
                OK = false;
            }

            Assert.IsTrue(OK);
        }
Exemplo n.º 5
0
    protected void BtnFind_Click(object sender, EventArgs e)
    {
        ClsPosition position = new ClsPosition();
        Int32       positionID;
        Boolean     Found = false;

        if (System.Text.RegularExpressions.Regex.IsMatch(TbPositionID.Text, "^[a-zA-Z]*$"))
        {
            Response.Redirect("PositionPage.aspx");
        }

        positionID = Convert.ToInt32(TbPositionID.Text);
        Found      = position.Find(positionID);

        if (Found == true)
        {
            TbPositionName.Text = position.PositionName;
            TbDescription.Text  = position.Description;
            TbSalary.Text       = position.Salary.ToString();
        }
    }