public void TestRemove() { //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); form.bBreakfast_Click(this, null); //baseline Assert.IsTrue(form.getListBox("lbOrder").Items.Count == 2, "lbOrder count not 2"); Assert.IsTrue(form.prices.Count == 2, "Prices count not 2"); //action form.bRemove_Click(this, null); //check Assert.IsTrue(form.getListBox("lbOrder").Items.Count == 1, "lbOrder count not 1"); Assert.IsTrue(form.prices.Count == 1, "Prices count not 1"); }
public void TestRemove() { //setup NuWayOrderForm form = new NuWayOrderForm(); form.Show(); form.bBreakfast_Click(this, null); form.bBreakfast_Click(this, null); //baseline Assert.IsTrue(form.getListBox("lbOrder").Items.Count == 2, "lbOrder count not 2"); Assert.IsTrue(form.prices.Count == 2, "Prices count not 2"); //action form.bRemove_Click(this, null); //check Assert.IsTrue(form.getListBox("lbOrder").Items.Count == 1, "lbOrder count not 1"); Assert.IsTrue(form.prices.Count == 1, "Prices count not 1"); }