コード例 #1
0
        public void IsValid_WithPalindromeWord_ReturnsTrue()
        {
            const string word = "civic";
            TwoPointersPalindromeStrategy validator = new TwoPointersPalindromeStrategy();
            bool result = validator.IsValid(word);

            Assert.IsTrue(result);
        }
コード例 #2
0
        public void IsValid_WithPalindromeWord_ReturnsTrue()
        {
            const string word = "civic";
            TwoPointersPalindromeStrategy validator = new TwoPointersPalindromeStrategy();
            bool result = validator.IsValid(word);

            Assert.IsTrue(result);
        }
コード例 #3
0
        public void IsValid_WithEmptyString_ThrowsAnArgumentNullException()
        {
            TwoPointersPalindromeStrategy validator = new TwoPointersPalindromeStrategy();

            validator.IsValid(string.Empty);
        }
コード例 #4
0
        private void btnTwoPoints_Click(object sender, EventArgs e)
        {
            IPalindromeStrategy strategy = new TwoPointersPalindromeStrategy();

            RunValidation(strategy);
        }
コード例 #5
0
 public void IsValid_WithNullString_ThrowsAnArgumentNullException()
 {
     TwoPointersPalindromeStrategy validator = new TwoPointersPalindromeStrategy();
     validator.IsValid(null);
 }