Exemplo n.º 1
0
        public void IsDiff_IncompleteDiff_ReturnsFalse()
        {
            var diffText = new[]
            {
                "--- a/cppupdatr/Refactor/MoveFile.cs",
                "+++ b/cppupdatr/Refactor/MoveFile.cs",
            }.StringJoin('\n');

            DiffUtils.IsDiff(diffText).ShouldBeFalse();
        }
Exemplo n.º 2
0
        public void IsDiff_BrokenDiff_ReturnsFalse()
        {
            var diffText = new[]
            {
                "--- a/cppupdatr/Refactor/MoveFile.cs",
                " +++ b/cppupdatr/Refactor/MoveFile.cs",
                "@@ -1,6 +1,7 @@"
            }.StringJoin('\n');

            DiffUtils.IsDiff(diffText).ShouldBeFalse();
        }
Exemplo n.º 3
0
        public void IsDiff_ValidCrLfDiff_ReturnsTrue()
        {
            var diffText = new[]
            {
                "--- a/cppupdatr/Refactor/MoveFile.cs",
                "+++ b/cppupdatr/Refactor/MoveFile.cs",
                "@@ -1,6 +1,7 @@",
            }.StringJoin("\r\n");

            DiffUtils.IsDiff(diffText).ShouldBeTrue();
        }
Exemplo n.º 4
0
 public void IsDiff_EmptyDiff_ReturnsFalse()
 {
     DiffUtils.IsDiff("").ShouldBeFalse();
 }