Example #1
0
        public void LetterChanged_IndexIsGreaterThanLength_ExceptionIsThrown()
        {
            string word = "aax";
            var    sut  = new ChainOfSameLettersDistinguisher(word);

            Assert.Throws <ArgumentException>(() => sut.LetterChanged(4));
        }
Example #2
0
        public void LetterChanged_FirstLetterOfGroup_True()
        {
            string word   = "aabx";
            var    sut    = new ChainOfSameLettersDistinguisher(word);
            bool   result = sut.LetterChanged(2);

            Assert.That(result, Is.True);
        }
Example #3
0
        public void LetterChanged_LastLetterOfGroup_False()
        {
            string word   = "aax";
            var    sut    = new ChainOfSameLettersDistinguisher(word);
            bool   result = sut.LetterChanged(1);

            Assert.That(result, Is.False);
        }