Пример #1
0
        public void Test_Add_Get_Measures()
        {
            string item     = "kg";
            string expected = "kg";

            facade.AddMeasureType(item);

            string actual = (facade.GetMeasureType().Rows[0].ItemArray[0].ToString());

            Assert.AreEqual(expected, actual);
        }
Пример #2
0
 private void butAdd_Click(object sender, EventArgs e)
 {
     facade = new Facade();
     try
     {
         facade.AddMeasureType(textBox1.Text);
         lb_error.Visible = false;
     }
     catch (Exception)
     {
         lb_error.Visible = true;
     }
     if (lb_error.Visible != true)
     {
         textBox1.Text            = "";
         dataGridView1.DataSource = facade.GetMeasureType();
     }
 }