Пример #1
0
        public void GetHunkNewFile_DeleteDiff_ExpectHunkNewFile()
        {
            //Arrange
            var uniDiffParser = new UnifiedFormatDiffParser(DiffOfADeleteOfThreeLines, 0);

            //Act
            var hunkOriginalFile = uniDiffParser.GetHunkOriginalFile(uniDiffParser.GetUnifiedFormatHunkLines().First().Item1);

            //Assert
            hunkOriginalFile.ShouldBe("7,3");
        }
Пример #2
0
        public void GetHunkNewFile_WithOneHunk_ExpectHunkNewFile()
        {
            //Arrange
            var uniDiffParser = new UnifiedFormatDiffParser(FirstUnifiedDiff, 0);

            //Act
            string hunkOriginalFile = uniDiffParser.GetHunkOriginalFile(uniDiffParser.GetUnifiedFormatHunkLines().First().Item1);

            //Assert
            hunkOriginalFile.ShouldBe("41,0");
        }