Exemple #1
0
 public IDiff Diff(string revision, string filePath)
 {
     if (fullDiffRevision != revision)
     {
         using (var diff = svn.Diff(revision))
         {
             fullDiff = new SvnFullUniDiff(diff);
         }
         fullDiffRevision = revision;
     }
     return(fullDiff[filePath]);
 }
        public void Should_parse_only_one_file()
        {
            diff = new SvnFullUniDiff(diff1.ToStream());

            diff.Count
            .Should().Be(3);

            diff["/test/Log.cs"].AddedLines.Count()
            .Should().Be(14);
            diff["/test/Log.cs"].RemovedLines.Count()
            .Should().Be(0);
            diff["/test/Program.cs"].AddedLines.Count()
            .Should().Be(2);
            diff["/test/Program.cs"].RemovedLines.Count()
            .Should().Be(2);
            diff["/test/test.csproj"].AddedLines.Count()
            .Should().Be(1);
            diff["/test/test.csproj"].RemovedLines.Count()
            .Should().Be(0);
        }