Exemple #1
0
        public void TestReplacedItemsAreTracked()
        {
            var changedString = @"
A + trunk/vendors/baker/toast.txt
    (von trunk/vendors/baker/bread.txt:r63)
D   trunk/vendors/baker/bread.txt";

            var items = SvnLook.ParseAffectedItems(changedString);

            Assert.True(items.Count == 2);
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/toast.txt" && x.Action == RepositoryItemAction.Add && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/bread.txt" && x.Action == RepositoryItemAction.Replace && x.NodeKind == RepositoryItemNodeKind.File));
        }
Exemple #2
0
        public void TestAffectedItems()
        {
            var changedString = @"
A   trunk/vendors/baker/toast.txt
U   trunk/vendors/baker/bakerman.txt
U   trunk/vendors/baker/oven.txt
A   trunk/vendors/baker/bread.txt";

            var items = SvnLook.ParseAffectedItems(changedString);

            Assert.True(items.Count == 4);
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/toast.txt" && x.Action == RepositoryItemAction.Add && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/bakerman.txt" && x.Action == RepositoryItemAction.Modifiy && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/oven.txt" && x.Action == RepositoryItemAction.Modifiy && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/bread.txt" && x.Action == RepositoryItemAction.Add && x.NodeKind == RepositoryItemNodeKind.File));
        }
Exemple #3
0
        public void TestCopySourceIsTracked()
        {
            var changedString = @"
_U  branches/123/vendors/baker/
U   branches/123/vendors/baker/toast.txt
A + branches/123/vendors/baker/bread.txt
    (from trunk/vendors/baker/bread.txt:r111)
U   branches/123/vendors/baker/oven.txt";

            var items = SvnLook.ParseAffectedItems(changedString);

            Assert.True(items.Count == 5);
            Assert.True(items.Any(x => x.Path == "/branches/123/vendors/baker/" && x.Action == RepositoryItemAction.Modifiy && x.NodeKind == RepositoryItemNodeKind.Directory));
            Assert.True(items.Any(x => x.Path == "/branches/123/vendors/baker/toast.txt" && x.Action == RepositoryItemAction.Modifiy && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/branches/123/vendors/baker/bread.txt" && x.Action == RepositoryItemAction.Add && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/trunk/vendors/baker/bread.txt" && x.Action == RepositoryItemAction.None && x.NodeKind == RepositoryItemNodeKind.File));
            Assert.True(items.Any(x => x.Path == "/branches/123/vendors/baker/oven.txt" && x.Action == RepositoryItemAction.Modifiy && x.NodeKind == RepositoryItemNodeKind.File));
        }