CheckCellTests.LCSTests.IndicesAppended C# (CSharp) Method

IndicesAppended() private method

private IndicesAppended ( ) : void
return void
        public void IndicesAppended()
        {
            var s1 = "abc";
            var s2 = "abcc";
            // this returns exactly one left-aligned common subsequence, chosen randomly
            var ss = LongestCommonSubsequence.LeftAlignedLCS(s1, s2);

            // get the appended indices
            var idxs = LongestCommonSubsequence.GetAddedCharIndices(s2, ss);

            Assert.AreEqual(1, idxs.Count());
            Assert.AreEqual(idxs[0], 3);
        }