public void FindMethodOK() { ClsOrder AnOrder = new ClsOrder(); Boolean Found = false; Int32 ONumber = 3; Found = AnOrder.Find(ONumber); Assert.IsTrue(Found); }
public void FindMethodOkay() { //create an instance of the class we want to create ClsOrder AnOrder = new ClsOrder(); //Boolean value to store the results of the validation Boolean Found = false; //Create some test data to use with the method Int32 OrderID = 1; //Invoke the method Found = AnOrder.Find(OrderID); //test to see if the result is true Assert.IsTrue(Found); }
public void FindMethodOK() { //Creates a new instance of the Order class ClsOrder anOrder = new ClsOrder(); //boolean variable to store the result of the validation. Boolean Found = false; //creates some test data that is assigned to a variable. int OrderID = 49; //assigns the data to the property. Found = anOrder.Find(OrderID); //test to see that the result is correct Assert.IsTrue(Found); }
public void FindONumberOK() { ClsOrder AnOrder = new ClsOrder(); Boolean Found = false; Boolean OK = true; Int32 ONumber = 1; Found = AnOrder.Find(ONumber); if (AnOrder.ONumber != 1) { OK = false; } Assert.IsTrue(OK); }
public void FindDateOK() { ClsOrder AnOrder = new ClsOrder(); Boolean Found = false; Boolean OK = true; Int32 ONumber = 1; Found = AnOrder.Find(ONumber); if (AnOrder.Date != Convert.ToDateTime("11/01/2020")) { OK = false; } Assert.IsTrue(OK); }
public void FindNotesOK() { ClsOrder AnOrder = new ClsOrder(); Boolean Found = false; Boolean OK = true; Int32 ONumber = 1; Found = AnOrder.Find(ONumber); if (AnOrder.Notes != "Leave with reception") { OK = false; } Assert.IsTrue(OK); }
protected void Button_OFind_Click(object sender, EventArgs e) { ClsOrder AnOrder = new ClsOrder(); Int32 ONumber; Boolean Found = false; ONumber = Convert.ToInt32(TextBox_ONum.Text); Found = AnOrder.Find(ONumber); if (Found == true) { TextBox_CID.Text = AnOrder.CustomerID.ToString(); TextBox_Notes.Text = AnOrder.Notes; TextBox_DateA.Text = AnOrder.Date.ToString(); CheckBox_OComplete.Checked = AnOrder.Complete; } }
public void TestOrderStatusFound() { //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 data is OK (assume it is) Boolean Okay = true; //create some test data to use with the method Int32 OrderID = 21; //invoke the method Found = AnOrder.Find(OrderID); //check the Order Status if (AnOrder.OrderStatus != "Test Order Status") { Okay = false; } }
public void TestCompletedFound() { //Creates a new instance of the Order class ClsOrder anOrder = new ClsOrder(); //boolean variable to store the result of the validation. Boolean Found = false; //boolean variable to record if data is OK Boolean OK = true; //creates some test data that is assigned to a variable. int OrderID = 49; //assigns the data to the property. Found = anOrder.Find(OrderID); if (anOrder.Completed != true) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestCustomerIDFound() { //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 data is OK (assume it is) Boolean Okay = true; //create some test data to use with the method Int32 OrderID = 5; //invoke the method Found = AnOrder.Find(OrderID); //check the Customer ID if (AnOrder.CustomerID != 5) { Okay = false; } //test to see that the result is correct Assert.IsTrue(Okay); }
public void TestOrderShippedFound() { //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 data is OK (assume it is) Boolean OK = true; //create some test data to use with the method Int32 OrderID = 21; //invoke the method Found = AnOrder.Find(OrderID); //check if it exists if (AnOrder.OrderShipped != true) { OK = false; } //test to see that the result is correct Assert.IsTrue(OK); }
public void TestOrderDateFound() { //create an instance of the class we want to create ClsOrder AnOrder = new ClsOrder(); //Boolean value to store the results of the search Boolean Found = false; //Boolean variable to record if data is okay(Assume it is) Boolean Okay = true; //Create some test data to use with the method Int32 OrderID = 5; //Invoke the method Found = AnOrder.Find(OrderID); //Check the Order Date if (AnOrder.OrderDate != Convert.ToDateTime("16/02/2021")) { Okay = false; } //test to see if the result is true Assert.IsTrue(Okay); }
protected void BtnFind_Click(object sender, EventArgs e) { //creates a new instance of ClsOrder ClsOrder AnOrder = new ClsOrder(); //Variable to store primary key Int32 OrderID; //variable to store result of find operation Boolean Found = false; //primary key entered by the user OrderID = Convert.ToInt32(txtOrderID.Text); //find the record Found = AnOrder.Find(OrderID); //if found if (Found == true) { //display values of properties in the form txtOrderID.Text = AnOrder.OrderID.ToString(); txtOrderDate.Text = AnOrder.OrderDate.ToString(); txtCustomerID.Text = AnOrder.CustomerID.ToString(); txtShippingAddress.Text = AnOrder.ShippingAddress; txtOrderStatus.Text = AnOrder.OrderStatus; } }