private void button1_Click(object sender, EventArgs e) { OrderList.OrderService service = new OrderList.OrderService(); uint i = Convert.ToUInt32(textBox1.Text); service.RemoveOrder(i); DialogResult result = MessageBox.Show("订单删除成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
public void TestRemoveOrder() { orderService.orderDict.Add(1, order1); orderService.RemoveOrder(1); Assert.IsFalse(orderService.orderDict.ContainsValue(order1)); }