Пример #1
0
		public void ValidateMatchedPairs_InvalidEntries()
		{
			PunctuationDlg punctDlg = new PunctuationDlg();
			MatchedPairList pairList = new MatchedPairList();
			MatchedPair pair = new MatchedPair();
			pair.Close = ")";
			pairList.Add(pair);

			bool result = ReflectionHelper.GetBoolResult(punctDlg, "ValidateMatchedPairs",
				new object[] {pairList, false});
			Assert.IsFalse(result);
		}
Пример #2
0
		public void ValidateMatchedPairs_ValidEntries()
		{
			using (var punctDlg = new PunctuationDlg())
			{
				var pairList = new MatchedPairList();
				var pair = new MatchedPair { Open = "(", Close = ")" };
				pairList.Add(pair);

				bool result = ReflectionHelper.GetBoolResult(punctDlg, "ValidateMatchedPairs",
					new object[] { pairList, false });
				Assert.IsTrue(result);
			}
		}
Пример #3
0
        public void ValidateMatchedPairs_InvalidEntries()
        {
            PunctuationDlg  punctDlg = new PunctuationDlg();
            MatchedPairList pairList = new MatchedPairList();
            MatchedPair     pair     = new MatchedPair();

            pair.Close = ")";
            pairList.Add(pair);

            bool result = ReflectionHelper.GetBoolResult(punctDlg, "ValidateMatchedPairs",
                                                         new object[] { pairList, false });

            Assert.IsFalse(result);
        }
Пример #4
0
        public void ValidateMatchedPairs_ValidEntries()
        {
            using (var punctDlg = new PunctuationDlg())
            {
                var pairList = new MatchedPairList();
                var pair     = new MatchedPair {
                    Open = "(", Close = ")"
                };
                pairList.Add(pair);

                bool result = ReflectionHelper.GetBoolResult(punctDlg, "ValidateMatchedPairs",
                                                             new object[] { pairList, false });
                Assert.IsTrue(result);
            }
        }