public void GetTextLineTest2()
        {
            // arraange
            var origTextList = new List<string>()
            {
                "a","b","c"
            };

            var changTextList = new List<string>()
            {
                "a","c","b"
            };

            var expected = new List<SurvivedTextLine>()
            {
                new SurvivedTextLineLeaf("a",0,0),
                new SurvivedTextLineLeaf("b",1,2),
            };

            ISurvivedTextTreeCreator tlc = new SurvivedTextTreeCreator(new StrComparer());

            // act
            var result = tlc.GetTextLine(origTextList, changTextList).GetThisAndNextValues().ToList();

            //assert
            CoreCompare(expected, result);
        }
        public void GetTextLineTest1_GetTotalWeight()
        {
            // arraange
            var origTextList = new List<string>()
            {
                "a","b"
            };

            var changTextList = new List<string>()
            {
                "a","b"
            };

            ISurvivedTextTreeCreator tlc = new SurvivedTextTreeCreator(new StrComparer());

            // act
            var result = tlc.GetTextLine(origTextList, changTextList);

            //assert
            Assert.AreEqual(2, result.GetTotalWeight());
        }
        public void GetTextLineTest3()
        {
            // arraange
            var origTextList = new List<string>()
            {
                "0","1","2","3","4","5"
            };

            var changTextList = new List<string>()
            {
                "0","2","3","1","4","5"
            };

            var expected = new List<SurvivedTextLine>()
            {
                new SurvivedTextLineLeaf("0",0,0),
                new SurvivedTextLineLeaf("2",2,1),
                new SurvivedTextLineLeaf("3",3,2),
                new SurvivedTextLineLeaf("4",4,4),
                new SurvivedTextLineLeaf("5",5,5),
            };

            ISurvivedTextTreeCreator tlc = new SurvivedTextTreeCreator(new StrComparer());

            // act
            var result = tlc.GetTextLine(origTextList, changTextList).GetThisAndNextValues().ToList();

            //assert
            CoreCompare(expected, result);
        }
        public void GetTextLineTest5_NullOrig()
        {
            // arraange
            List<string> origTextList = null;
            var changTextList = new List<string>() { "0", "1" };

            // act
            ISurvivedTextTreeCreator tlc = new SurvivedTextTreeCreator(new StrComparer());
            tlc.GetTextLine(origTextList, changTextList);
        }
        public void GetTextLineTest5_EmptyOrig()
        {
            // arraange
            var origTextList = new List<string>(){};
            var changTextList = new List<string>() {"0", "1"};
            var expectedCount = 0;
            ISurvivedTextTreeCreator tlc = new SurvivedTextTreeCreator(new StrComparer());

            // act
            SurvivedTextLine res = tlc.GetTextLine(origTextList, changTextList);
            var resultCount = res.GetThisAndNextValues().ToList().Count;

            //assert
            Assert.AreEqual(expectedCount, resultCount);
        }