예제 #1
0
        public void AddOverClientTest()
        {
            //arrange
            MainViewModel c      = new MainViewModel();
            int           actual = 2;

            c.CityList[0].DateOfZamer[0, 0, 0].CountOfZamer = actual;

            c.DateDay     = 1;
            c.DateMounth  = 1;
            c.DateYear    = 2000;
            c.ClientPhone = "895522152212";
            c.ClientName  = "Иванов И.И.";
            c.CityName    = c.CityList[0];
            string actual2 = "На этот день нет замеров";

            //act

            c.AddClient();
            c.AddClient();
            c.AddClient();
            string expected2 = c.OshibkaNetZamershikov;
            int    expected  = c.CityList[0].DateOfZamer[0, 0, 0].ClientList.Count;

            //assert

            Assert.AreEqual(actual, expected);
            Assert.AreEqual(actual2, expected2);
        }
예제 #2
0
        public void AddClientTest()
        {
            //arrange
            MainViewModel c      = new MainViewModel();
            int           actual = 2;

            c.CityList[0].DateOfZamer[0, 0, 0].CountOfZamer = actual;

            c.DateDay     = 1;
            c.DateMounth  = 1;
            c.DateYear    = 2000;
            c.ClientPhone = "895522152212";
            c.ClientName  = "Иванов И.И.";
            c.CityName    = c.CityList[0];


            //act

            c.AddClient();
            c.AddClient();

            int expected = c.CityList[0].DateOfZamer[0, 0, 0].ClientList.Count;

            //assert

            Assert.AreEqual(actual, expected);
        }
예제 #3
0
 private void AddClient_Click(object sender, RoutedEventArgs e)
 {
     if (listView.Items.Count > 0)
     {
         _viewModel.AddClient();
         _viewModel.Load();
     }
     else
     {
         MessageBox.Show("Debe agregar una caja abierta", "Información");
     }
 }