Esempio n. 1
0
        public void TestAddPair(string text, bool expAddition, int pairsCount)
        {
            bool additionResult = _viewModel.AddPair(text);

            Assert.AreEqual(expAddition, additionResult);
            Assert.AreEqual(_viewModel.PairsCollection.Count, pairsCount);
        }
 private void btnAddPair_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(txtPairCriteria.Text))
     {
         MessageBox.Show("Please fill the field !");
     }
     else if (!_viewModel.AddPair(txtPairCriteria.Text))
     {
         MessageBox.Show("Pair should be alpha-numeric in this Format 'Name' = 'Value' !");
     }
 }