Ejemplo n.º 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);
		}
Ejemplo n.º 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);
			}
		}
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }