public void TestClear() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.bBreakfast_Click(this, null); form.bDrinks_Click(this, null); form.bLD_Click(this, null); form.bDessert_Click(this, null); //baseline Assert.IsTrue(form.getTextBox("tbTotal").Text == "11.09", "tbTotal not accurate"); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "10.46", "tbSubTotal not accurate."); Assert.IsTrue(form.getListBox("lbOrder").Items.Count == 4, "4 Items not added."); Assert.IsTrue(form.prices.Count == 4, "prices not 4."); //action form.bClear_Click(this, null); //checks Assert.IsTrue(form.getTextBox("tbTotal").Text == "0.00", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "0.00", "tbSubTotal not 0.00."); Assert.IsTrue(form.getListBox("lbOrder").Items.Count == 0, "4 Items not added"); Assert.IsTrue(form.prices.Count == 0, "prices not empty."); }
public void TestZeroOut() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.LoginService = new TestBox(); form.login.isAuthentic = true; form.signInToolStripMenuItem_Click(this, null); form.bBreakfast_Click(this, null); //baseline Assert.IsTrue(form.getTextBox("tbTotal").Text != "0.00", "tbTotal is 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text != "0.00", "tbSubTotal is 0.00."); //action form.zeroOut(); //check Assert.IsTrue(form.getTextBox("tbTotal").Text == "0.00", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "0.00", "tbSubTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbTax").Text == "0.06", "tbTax not 0.06."); }
public void TestTotalNotEmpty() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.LoginService = new TestBox(); form.login.isAuthentic = true; form.signInToolStripMenuItem_Click(this, null); //action form.bBreakfast_Click(this, null); form.bDrinks_Click(this, null); form.bLD_Click(this, null); form.bDessert_Click(this, null); //check Assert.IsTrue(form.getTextBox("tbTotal").Text == "11.09", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "10.46", "tbSubTotal not 0.00."); }
public void TestTotalEmpty() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.LoginService = new TestBox(); form.login.isAuthentic = true; form.signInToolStripMenuItem_Click(this, null); //check Assert.IsTrue(form.getTextBox("tbTotal").Text == "0.00", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "0.00", "tbSubTotal not 0.00."); }
public void TestTextboxesLoad() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.LoginService = new TestBox(); form.login.isAuthentic = true; form.signInToolStripMenuItem_Click(this, null); //check Assert.AreEqual(form.getTextBox("tbTotal").Text, "0.00", "Total not zeroed"); Assert.AreEqual(form.getTextBox("tbTax").Text, "0.06", "Tax not zeroed"); Assert.AreEqual(form.getTextBox("tbSubtotal").Text, "0.00", "SubTotal not zeroed"); Assert.IsTrue(form.prices.Count == 0, "Prices not empty"); }
public void TestZeroOut() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.bBreakfast_Click(this, null); //baseline Assert.IsTrue(form.getTextBox("tbTotal").Text != "0.00", "tbTotal is 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text != "0.00", "tbSubTotal is 0.00."); //action form.zeroOut(); //check Assert.IsTrue(form.getTextBox("tbTotal").Text == "0.00", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "0.00", "tbSubTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbTax").Text == "0.06", "tbTax not 0.06."); }
public void TestTotalNotEmpty() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); //action form.bBreakfast_Click(this, null); form.bDrinks_Click(this, null); form.bLD_Click(this, null); form.bDessert_Click(this, null); //check Assert.IsTrue(form.getTextBox("tbTotal").Text == "11.09", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "10.46", "tbSubTotal not 0.00."); }
public void TestTotalEmpty() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); //check Assert.IsTrue(form.getTextBox("tbTotal").Text == "0.00", "tbTotal not 0.00."); Assert.IsTrue(form.getTextBox("tbSubtotal").Text == "0.00", "tbSubTotal not 0.00."); }
public void TestTextboxesLoad() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); //check Assert.AreEqual(form.getTextBox("tbTotal").Text, "0.00", "Total not zeroed"); Assert.AreEqual(form.getTextBox("tbTax").Text, "0.06", "Tax not zeroed"); Assert.AreEqual(form.getTextBox("tbSubtotal").Text, "0.00", "SubTotal not zeroed"); Assert.IsTrue(form.prices.Count == 0, "Prices not empty"); }