Пример #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            int countBe = listBox1.Items.Count;
            int countAf;

            SeccessList seccessList = new SeccessList();

            bd.WorkWithBD(String.Format("INSERT INTO Buckets VALUES({0}, {1})", idBucket, products[5]));
            bd.WorkWithBD(String.Format("UPDATE Products SET Quantity = {0} WHERE Id = {1}", Int32.Parse(products[4]) - 1, products[5]));
            bd.ViewAll(listBox1, false);

            countAf = listBox1.Items.Count;

            if (countBe != countAf)
            {
                listBox1.SelectedIndex = 0;
                Filded();
            }
            else
            {
                listBox1.SelectedIndex = subString.IdList(listBox1, products[0]);
                Filded();
            }

            seccessList.SeccessMessage(3);
        }
Пример #2
0
        public void SeccessStr_seccessId_GoodResult(int id, string result)
        {
            string expected = result;

            SeccessList seccessList = GetSeccessList();
            string      actual      = seccessList.SeccessStr(id);

            Assert.AreEqual(expected, actual);
        }