commit b666b39aaca5965ba58b484f1042c6a952f210f4
Author: Panagiotis Kanavos <pkanavos@gmail.com>
Date:   Tue Feb 28 13:41:41 2012 +0200

    Added modifications for move detection. Resolves #1999, #1891

diff --git a/trunk/Pithos.Core.Test/SnapshotDifferencerTest.cs b/trunk/Pithos.Core.Test/SnapshotDifferencerTest.cs
index 464c502..ba51a20 100644
--- a/trunk/Pithos.Core.Test/SnapshotDifferencerTest.cs
+++ b/trunk/Pithos.Core.Test/SnapshotDifferencerTest.cs
@@ -28,34 +28,34 @@ namespace Pithos.Core.Test
         public void Setup()
         {
             _previous = new []{
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
                             };
             _current = new []{
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=1234,Hash="aa45",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name5",Bytes=123,Hash="aa5",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=1234,Hash="aa45",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name5",Bytes=123,Hash="aa5",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=1234,Hash="aa45",Version=1,UUID="4"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name5",Bytes=123,Hash="aa5",Version=1,UUID="14"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=1234,Hash="aa45",Version=1,UUID="11"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name5",Bytes=123,Hash="aa5",Version=1,UUID="15"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
                            };
             
         }
@@ -68,6 +68,7 @@ namespace Pithos.Core.Test
             Assert.That(differencer.Deleted,Is.Empty);
             Assert.That(differencer.Created,Is.EquivalentTo(_previous));
             Assert.That(differencer.Changed,Is.Empty);
+            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
             Assert.That(differencer.Unchanged,Is.Empty);
         }
 
@@ -78,8 +79,8 @@ namespace Pithos.Core.Test
             var differencer=d1.Post(_previous).Post(_current);
             var deleted=new[]
                             {
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
                             };
             Assert.That(differencer.Deleted.ToList(),Is.EquivalentTo(deleted)
                 .Using((IEqualityComparer) new ObjectInfoComparer()));
@@ -91,8 +92,8 @@ namespace Pithos.Core.Test
             var differencer=d1.Post(_previous).Post(_current);
             var created = new[]
                               {
-                                  new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1 },
-                                  new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1 },
+                                  new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1,UUID="14" },
+                                  new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1,UUID="15" },
                               };
             Assert.That(differencer.Created.ToList(), Is.EquivalentTo(created)
                 .Using((IEqualityComparer)new ObjectInfoComparer()));
@@ -103,8 +104,8 @@ namespace Pithos.Core.Test
             var d1 = new SnapshotDifferencer();            
             var differencer=d1.Post(_previous).Post(_current);
             var changed = new[] { 
-                new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1 },
-                new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1 },
+                new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1,UUID="4" },
+                new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1,UUID="11" },
             };
 
             Comparison<ObjectInfo> comparer = (x, y) =>
@@ -122,21 +123,150 @@ namespace Pithos.Core.Test
         }
 
         [Test]
+        public void when_adding_a_second_snapshot_with_a_rename()
+        {
+            var d1 = new SnapshotDifferencer();
+            var current = new[]{
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa3",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
+                            };
+
+            var differencer=d1.Post(_previous).Post(current);
+            var moved = new[] { 
+                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa3",PreviousHash="aa3",Version=1,UUID="3"}
+            };
+
+            Comparison<ObjectInfo> comparer = (x, y) =>
+                                                  {
+                                                      if (x.Account == y.Account
+                                                          && x.Container == y.Container
+                                                          && x.Name == y.Name
+                                                          && x.Hash == y.Hash
+                                                          && x.PreviousHash == y.PreviousHash)
+                                                          return 0;
+                                                      return 1;
+                                                  };
+            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
+            Assert.That(differencer.Deleted, Is.Empty);
+            Assert.That(differencer.Created, Is.Empty);
+            Assert.That(differencer.Changed, Is.Empty);
+            //Assert.That(differencer.Unchanged, Is.Empty);
+            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
+        }
+
+        [Test]
+        public void when_adding_a_second_snapshot_with_a_changed_rename()
+        {
+            var d1 = new SnapshotDifferencer();
+            var current = new[]{
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa35",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
+                            };
+
+            var differencer = d1.Post(_previous).Post(current);
+            var moved = new[] { 
+                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa35",PreviousHash="aa3",Version=1,UUID="3"}
+            };
+
+            Comparison<ObjectInfo> comparer = (x, y) =>
+            {
+                if (x.Account == y.Account
+                    && x.Container == y.Container
+                    && x.Name == y.Name
+                    && x.Hash == y.Hash
+                    && x.PreviousHash == y.PreviousHash)
+                    return 0;
+                return 1;
+            };
+            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
+            Assert.That(differencer.Deleted, Is.Empty);
+            Assert.That(differencer.Created, Is.Empty);
+            Assert.That(differencer.Changed, Is.Empty);
+            //Assert.That(differencer.Unchanged, Is.Empty);
+            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
+        }
+
+        [Test]
+        public void when_adding_a_second_snapshot_with_a_move()
+        {
+            var d1 = new SnapshotDifferencer();
+            var current = new[]{
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
+                            };
+
+            var differencer=d1.Post(_previous).Post(current);
+            var moved = new[] { 
+                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name3",Bytes=123,Hash="aa3",PreviousHash="aa3",Version=1},
+            };
+
+            Comparison<ObjectInfo> comparer = (x, y) =>
+                                                  {
+                                                      if (x.Account == y.Account
+                                                          && x.Container == y.Container
+                                                          && x.Name == y.Name
+                                                          && x.Hash == y.Hash
+                                                          && x.PreviousHash == y.PreviousHash)
+                                                          return 0;
+                                                      return 1;
+                                                  };
+
+            Assert.That(differencer.Deleted, Is.Empty);
+            Assert.That(differencer.Created, Is.Empty);
+            Assert.That(differencer.Changed, Is.Empty);
+            //Assert.That(differencer.Unchanged, Is.Empty);
+            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
+        }
+
+        [Test]
         public void when_adding_a_second_snapshot_with_unchanged()
         {
             var d1 = new SnapshotDifferencer();            
             var differencer=d1.Post(_previous).Post(_current);
             var unchanged = new[]
                                 {
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},  
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},  
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},                                    
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},  
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},  
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},                                    
                                 };            
             Assert.That(differencer.Unchanged.ToList(), Is.EquivalentTo(unchanged)
                 .Using((IEqualityComparer)new ObjectInfoComparer()));
@@ -150,6 +280,7 @@ namespace Pithos.Core.Test
             Assert.That(differencer.Deleted, Is.Empty);
             Assert.That(differencer.Created, Is.Empty);
             Assert.That(differencer.Changed, Is.Empty);
+            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
             Assert.That(differencer.Unchanged, Is.Empty);
         }
 
@@ -161,6 +292,7 @@ namespace Pithos.Core.Test
             Assert.That(differencer.Deleted, Is.EquivalentTo(_previous));
             Assert.That(differencer.Created, Is.Empty);
             Assert.That(differencer.Changed, Is.Empty);
+            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
             Assert.That(differencer.Unchanged, Is.Empty);
         }
 
@@ -181,6 +313,7 @@ namespace Pithos.Core.Test
             Assert.That(differencer.Deleted, Is.Empty,"should have no deletions");
             Assert.That(differencer.Created, Is.Empty,"should have no insertions");
             Assert.That(differencer.Changed, Is.Empty,"should have no changes");
+            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
             Assert.That(differencer.Unchanged, Is.EquivalentTo(_previous),"should be equivalent to previous");
             
         }
@@ -199,21 +332,21 @@ namespace Pithos.Core.Test
                                 };
             var deleted = new[]
                             {
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
                             };
             var unchanged = new[]{
-                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
-                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
-                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
+                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="1"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
+                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
+                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
+                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
                             };
             var differencer = d1.Post(_previous)
                 .Post(noModItems);
@@ -222,6 +355,7 @@ namespace Pithos.Core.Test
             Assert.That(differencer.Deleted.ToList(), Is.EquivalentTo(deleted).Using(_comparer), "should have deletions only from acc1/cont1");
             Assert.That(differencer.Created, Is.Empty,"should have no insertions");
             Assert.That(differencer.Changed, Is.Empty,"should have no changes");
+            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
             Assert.That(differencer.Unchanged, Is.EquivalentTo(unchanged).Using(_comparer),"should be equivalent to previous except the direct leafs of acc1/cont1");
             
         }
