Exemplo n.º 1
0
        public void FindMethodOK()
        {
            clsOrderline AnOrderline = new clsOrderline();
            Boolean      Found       = false;
            Int32        OLineNumber = 10;

            Found = AnOrderline.Find(OLineNumber);

            Assert.IsTrue(Found);
        }
Exemplo n.º 2
0
        public void FindMethod()
        {
            //create an instance of a class
            clsOrderline AOrderline = new clsOrderline();
            //boolean variable to store the result of the validation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 OrderlineID = 44;

            //invoke the method
            Found = AOrderline.Find(OrderlineID);
            //test to see that the result is correct
            Assert.IsTrue(Found);
        }
Exemplo n.º 3
0
        public void FindMethodOK()
        {
            // create an instance of the class
            clsOrderline AnOrderline = new clsOrderline();
            // boolean variable to store the result of validation
            Boolean Found = false;
            // some test data to test the method
            Int32 OrderId = 1;

            // invoke the method
            Found = AnOrderline.Find(OrderId);
            // test to see that the result is correct
            Assert.IsTrue(Found);
        }
Exemplo n.º 4
0
        public void FindQuantityOK()
        {
            clsOrderline AnOrderline = new clsOrderline();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        OLineNumber = 8;

            Found = AnOrderline.Find(OLineNumber);

            if (AnOrderline.Quantity != 3)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemplo n.º 5
0
        public void FindShoeIDOK()
        {
            clsOrderline AnOrderline = new clsOrderline();
            Boolean      Found       = false;
            Boolean      OK          = true;
            Int32        OLineNumber = 8;

            Found = AnOrderline.Find(OLineNumber);

            if (AnOrderline.ShoeID != 2)
            {
                OK = false;
            }
            Assert.IsTrue(OK);
        }
Exemplo n.º 6
0
    protected void Button_Find_Click1(object sender, EventArgs e)
    {
        clsOrderline AnOrderline = new clsOrderline();
        Int32        OLineNumber;
        Boolean      Found = false;

        OLineNumber = Convert.ToInt32(TextBox_Find.Text);
        Found       = AnOrderline.Find(OLineNumber);

        if (Found == true)
        {
            TextBox_OrderLQuantity.Text = AnOrderline.Quantity.ToString();
            TextBox_OrderLONumber.Text  = AnOrderline.ONumber.ToString();
            TextBox_ShoeID.Text         = AnOrderline.ShoeID.ToString();
        }
    }
Exemplo n.º 7
0
        //used to test the Quantity property of the class
        public void TestBookingIDFound()
        {
            //create an instance of a class
            clsOrderline AOrderline = new clsOrderline();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is ok
            Boolean OK = true;
            //create some test data to use with the method
            Int32 BookingID = 44;

            //invoke the method
            Found = AOrderline.Find(BookingID);
            //check the OrderlineID
            if (AOrderline.BookingID != 1)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }