Esempio n. 1
0
        public void FindString_AABBCCC2_ReturnsBBCCC()
        {
            sut = new Source.LongestSubstringFinder.LongestSubstringFinder("aabbccc", 2);
            string result = sut.FindString();

            Assert.That(result, Is.EqualTo("bbccc"));
        }
Esempio n. 2
0
        public void FindString_AAAB1_ReturnsAAA()
        {
            sut = new Source.LongestSubstringFinder.LongestSubstringFinder("aaab", 1);
            string result = sut.FindString();

            Assert.That(result, Is.EqualTo("aaa"));
        }
Esempio n. 3
0
        public void FindString_AABBC3_ReturnsAABBC()
        {
            sut = new Source.LongestSubstringFinder.LongestSubstringFinder(StringAabbc, 3);
            string result = sut.FindString();

            Assert.That(result, Is.EqualTo("aabbc"));
        }
Esempio n. 4
0
        public void FindString_AAAB2_ReturnsAAAB()
        {
            sut = new Source.LongestSubstringFinder.LongestSubstringFinder(string_aaab, 2);
            string result = sut.FindString();

            Assert.That(result, Is.EqualTo(string_aaab));
        }
        public void Test_02()
        {
            inputLine1 = "aaaaaaaabc";
            inputLine2 = 3;
            expected   = 10;

            var sut = new Source.LongestSubstringFinder.LongestSubstringFinder(inputLine1, inputLine2);

            Assert.That(sut.FindString().Length, Is.EqualTo(expected));
        }