示例#1
0
        public void FindMethodOK()
        {
            clsOrder OrderProcessing = new clsOrder();
            Boolean  Found           = false;
            Int32    ProductNo       = 1;

            Found = OrderProcessing.Find(ProductNo);
            Assert.IsTrue(Found);
        }
示例#2
0
        public void FindMethodOk()
        {
            //create an instance of the class
            clsOrder AnOrder = new clsOrder();
            //create some test data
            Boolean FoundTest = false;
            Int32   OrderID   = 1;

            //set the test data to the class and try to find it
            FoundTest = AnOrder.Find(OrderID);
            //check to see if its been found
            Assert.IsTrue(FoundTest);
        }
示例#3
0
        public void FindMethodOK()
        {
            //Create an instance of the class we want to create
            clsOrder AnOrder = new clsOrder();
            //Boolean variable to store the results of the validation
            Boolean Found = false;
            //Create some test data to use with the method
            Int32 OrderId = 7;

            //Invoke the method
            Found = AnOrder.Find(OrderId);
            //Test to see if the result is true
            Assert.IsTrue(Found);
        }
示例#4
0
        public void FindMethodOK()
        {
            //create an instance of the class we want to create
            clsOrder AnOrder = new clsOrder();
            //boolean variable to store the result of the validation
            Boolean Found = false;
            //create some test data to use with the method
            Int32 OrderNo = 1;

            //invoke the method
            Found = AnOrder.Find(OrderNo);
            //test to see that the result is correct
            Assert.IsTrue(Found);
        }
示例#5
0
        public void TestMadeFound()
        {
            //create an instance of the class
            clsOrder AnOrder = new clsOrder();
            //create some test data
            Boolean Found   = false;
            Boolean OK      = true;
            Int32   OrderId = 1;

            //set the test data to the class and try to find it
            Found = AnOrder.Find(OrderId);
            if (AnOrder.Made != true)
            {
                OK = false;
            }
            //check to see if its true
            Assert.IsTrue(OK);
        }
示例#6
0
        public void TestDateDispatchFound()
        {
            //create an instance of the class
            clsOrder AnOrder = new clsOrder();
            //create some test data
            Boolean Found   = false;
            Boolean OK      = true;
            Int32   OrderId = 1;

            //set the test data to the class and try to find it
            Found = AnOrder.Find(OrderId);
            if (AnOrder.DateDispatch != Convert.ToDateTime("14/02/2021"))
            {
                OK = false;
            }
            //check to see if its true
            Assert.IsTrue(OK);
        }
示例#7
0
        public void TestCustomerAddressFound()
        {
            //create an instance of the class
            clsOrder AnOrder = new clsOrder();
            //create some test data
            Boolean Found   = false;
            Boolean OK      = true;
            Int32   OrderId = 1;

            //set the test data to the class and try to find it
            Found = AnOrder.Find(OrderId);
            if (AnOrder.Address != "5 Colin Grundy Drive")
            {
                OK = false;
            }
            //check to see if its true
            Assert.IsTrue(OK);
        }
示例#8
0
        public void TestOrderQuantityFound()
        {
            //Create an instance of the class we want to create
            clsOrder AnOrder = new clsOrder();
            //Boolean variable to store the result of the search
            Boolean Found = false;
            //Boolean variable to record if the data is OK (assume it is)
            Boolean OK = true;
            //Create some test data to use with the method
            Int32 OrderId = 7;

            //Invoke the method
            Found = AnOrder.Find(OrderId);
            //Check the Order Id
            if (AnOrder.OrderQuantity != 1)
            {
                OK = false;
            }
            //Test to see that the result is correct
            Assert.IsTrue(OK);
        }
示例#9
0
        public void TestProductNoFound()
        {
            // create an instance of the class we want to create
            clsOrder OrderProcessing = new clsOrder();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is ok (assume it is)
            Boolean OK = true;
            //create some test data to use with the method
            Int32 ProductNo = 1;

            //invoke the method
            Found = OrderProcessing.Find(ProductNo);
            //check the address no
            if (OrderProcessing.ProductNo != 1)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }
示例#10
0
        public void TestClothesAvailableFound()
        {
            //create an instance of the class we want to create
            clsOrder AOrder = new clsOrder();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is OK (assume it is)
            Boolean OK = true;
            //create some test data to use with the method
            Int32 OrderNo = 1;

            //invoke the method
            Found = AOrder.Find(OrderNo);
            //check the property
            if (AOrder.ClothesAvailable != true)
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }