コード例 #1
0
        public void WhenContainsSpecialCharacters_RemoveThemAndReturnNextOfSequence()
        {
            var sequence = InfiniteAlphabetSequence.Generate("ab#c d*");

            Assert.AreEqual("abce", sequence);
        }
コード例 #2
0
        public void WhenStringEmpty_ReturnFirstAlphabetLetter()
        {
            var sequence = InfiniteAlphabetSequence.Generate("");

            Assert.AreEqual("A", sequence);
        }
コード例 #3
0
        public void WhenNotCapitalIfSequenceWithMoreThanOneCharacter_ReturnNextOfTheSequence()
        {
            var sequence = InfiniteAlphabetSequence.Generate("ghij");

            Assert.AreEqual("ghik", sequence);
        }
コード例 #4
0
        public void WhenNotCapitalAndIfSequenceWithOneCharacter_ReturnNextOfTheSequence()
        {
            var sequence = InfiniteAlphabetSequence.Generate("g");

            Assert.AreEqual("h", sequence);
        }
コード例 #5
0
        public void WhenNotCapitalAndLastAlphabetLetter_StartsFromTheBegining()
        {
            var sequence = InfiniteAlphabetSequence.Generate("z");

            Assert.AreEqual("aa", sequence);
        }
コード例 #6
0
        public void IfSequenceWithMoreThanOneCharacter_ReturnNextOfTheSequence()
        {
            var sequence = InfiniteAlphabetSequence.Generate("GHIJ");

            Assert.AreEqual("GHIK", sequence);
        }
コード例 #7
0
        public void WhenLastAlphabetLetter_StartsFromTheBegining()
        {
            var sequence = InfiniteAlphabetSequence.Generate("Z");

            Assert.AreEqual("AA", sequence);
        }