Revision b666b39a trunk/Pithos.Core.Test/SnapshotDifferencerTest.cs

b/trunk/Pithos.Core.Test/SnapshotDifferencerTest.cs
28 28
        public void Setup()
29 29
        {
30 30
            _previous = new []{
31
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
32
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
33
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
34
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1},
35
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},
36
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
37
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
38
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
39
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
40
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
41
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1},
42
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
43
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
31
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
32
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
33
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
34
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
35
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
36
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
37
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
38
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
39
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
40
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
41
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
42
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
43
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
44 44
                            };
45 45
            _current = new []{
46
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
47
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
48
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=1234,Hash="aa45",Version=1},
49
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name5",Bytes=123,Hash="aa5",Version=1},
50
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},
51
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
52
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
53
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
54
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
55
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=1234,Hash="aa45",Version=1},
56
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name5",Bytes=123,Hash="aa5",Version=1},
57
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
58
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
46
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
47
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
48
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=1234,Hash="aa45",Version=1,UUID="4"},
49
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name5",Bytes=123,Hash="aa5",Version=1,UUID="14"},
50
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
51
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
52
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
53
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
54
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
55
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=1234,Hash="aa45",Version=1,UUID="11"},
56
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name5",Bytes=123,Hash="aa5",Version=1,UUID="15"},
57
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
58
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
59 59
                           };
60 60
            
61 61
        }
......
68 68
            Assert.That(differencer.Deleted,Is.Empty);
69 69
            Assert.That(differencer.Created,Is.EquivalentTo(_previous));
70 70
            Assert.That(differencer.Changed,Is.Empty);
71
            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
71 72
            Assert.That(differencer.Unchanged,Is.Empty);
72 73
        }
73 74

  
......
78 79
            var differencer=d1.Post(_previous).Post(_current);
79 80
            var deleted=new[]
80 81
                            {
81
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
82
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
82
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
83
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
83 84
                            };
84 85
            Assert.That(differencer.Deleted.ToList(),Is.EquivalentTo(deleted)
85 86
                .Using((IEqualityComparer) new ObjectInfoComparer()));
......
91 92
            var differencer=d1.Post(_previous).Post(_current);
92 93
            var created = new[]
93 94
                              {
94
                                  new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1 },
95
                                  new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1 },
95
                                  new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1,UUID="14" },
96
                                  new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name5", Bytes = 123, Hash = "aa5", Version = 1,UUID="15" },
96 97
                              };
97 98
            Assert.That(differencer.Created.ToList(), Is.EquivalentTo(created)
98 99
                .Using((IEqualityComparer)new ObjectInfoComparer()));
......
103 104
            var d1 = new SnapshotDifferencer();            
104 105
            var differencer=d1.Post(_previous).Post(_current);
105 106
            var changed = new[] { 
106
                new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1 },
107
                new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1 },
107
                new ObjectInfo { Account = "acc1", Container = "Cont1", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1,UUID="4" },
108
                new ObjectInfo { Account = "acc1", Container = "Cont2", Name = "Name4", Bytes = 1234, Hash = "aa45", PreviousHash="aa4", Version = 1,UUID="11" },
108 109
            };
109 110

  
110 111
            Comparison<ObjectInfo> comparer = (x, y) =>
......
122 123
        }
123 124

  
124 125
        [Test]
126
        public void when_adding_a_second_snapshot_with_a_rename()
127
        {
128
            var d1 = new SnapshotDifferencer();
129
            var current = new[]{
130
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
131
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
132
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa3",Version=1,UUID="3"},
133
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
134
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
135
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
136
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
137
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
138
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
139
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
140
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
141
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
142
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
143
                            };
144

  
145
            var differencer=d1.Post(_previous).Post(current);
146
            var moved = new[] { 
147
                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa3",PreviousHash="aa3",Version=1,UUID="3"}
148
            };
149

  
150
            Comparison<ObjectInfo> comparer = (x, y) =>
151
                                                  {
152
                                                      if (x.Account == y.Account
153
                                                          && x.Container == y.Container
154
                                                          && x.Name == y.Name
155
                                                          && x.Hash == y.Hash
156
                                                          && x.PreviousHash == y.PreviousHash)
157
                                                          return 0;
158
                                                      return 1;
159
                                                  };
160
            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
161
            Assert.That(differencer.Deleted, Is.Empty);
162
            Assert.That(differencer.Created, Is.Empty);
163
            Assert.That(differencer.Changed, Is.Empty);
164
            //Assert.That(differencer.Unchanged, Is.Empty);
165
            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
166
        }
167

  
168
        [Test]
169
        public void when_adding_a_second_snapshot_with_a_changed_rename()
170
        {
171
            var d1 = new SnapshotDifferencer();
172
            var current = new[]{
173
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
174
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
175
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa35",Version=1,UUID="3"},
176
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
177
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
178
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
179
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
180
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
181
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
182
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
183
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
184
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
185
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
186
                            };
187

  
188
            var differencer = d1.Post(_previous).Post(current);
189
            var moved = new[] { 
190
                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3a",Bytes=123,Hash="aa35",PreviousHash="aa3",Version=1,UUID="3"}
191
            };
192

  
193
            Comparison<ObjectInfo> comparer = (x, y) =>
194
            {
195
                if (x.Account == y.Account
196
                    && x.Container == y.Container
197
                    && x.Name == y.Name
198
                    && x.Hash == y.Hash
199
                    && x.PreviousHash == y.PreviousHash)
200
                    return 0;
201
                return 1;
202
            };
203
            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
204
            Assert.That(differencer.Deleted, Is.Empty);
205
            Assert.That(differencer.Created, Is.Empty);
206
            Assert.That(differencer.Changed, Is.Empty);
207
            //Assert.That(differencer.Unchanged, Is.Empty);
208
            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
209
        }
210

  
211
        [Test]
212
        public void when_adding_a_second_snapshot_with_a_move()
213
        {
214
            var d1 = new SnapshotDifferencer();
215
            var current = new[]{
216
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
217
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
218
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
219
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
220
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},
221
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
222
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
223
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
224
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
225
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
226
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
227
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
228
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
229
                            };
230

  
231
            var differencer=d1.Post(_previous).Post(current);
232
            var moved = new[] { 
233
                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name3",Bytes=123,Hash="aa3",PreviousHash="aa3",Version=1},
234
            };
235

  
236
            Comparison<ObjectInfo> comparer = (x, y) =>
237
                                                  {
238
                                                      if (x.Account == y.Account
239
                                                          && x.Container == y.Container
240
                                                          && x.Name == y.Name
241
                                                          && x.Hash == y.Hash
242
                                                          && x.PreviousHash == y.PreviousHash)
243
                                                          return 0;
244
                                                      return 1;
245
                                                  };
246

  
247
            Assert.That(differencer.Deleted, Is.Empty);
248
            Assert.That(differencer.Created, Is.Empty);
249
            Assert.That(differencer.Changed, Is.Empty);
250
            //Assert.That(differencer.Unchanged, Is.Empty);
251
            Assert.That(differencer.Moved.ToList(), Is.EquivalentTo(moved).Using(comparer));
252
        }
253

  
254
        [Test]
125 255
        public void when_adding_a_second_snapshot_with_unchanged()
126 256
        {
127 257
            var d1 = new SnapshotDifferencer();            
128 258
            var differencer=d1.Post(_previous).Post(_current);
129 259
            var unchanged = new[]
130 260
                                {
131
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
132
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
133
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
134
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},  
135
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},  
136
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
137
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
138
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
139
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},                                    
261
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
262
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
263
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
264
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},  
265
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="5"},  
266
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
267
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
268
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
269
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},                                    
140 270
                                };            
141 271
            Assert.That(differencer.Unchanged.ToList(), Is.EquivalentTo(unchanged)
142 272
                .Using((IEqualityComparer)new ObjectInfoComparer()));
......
150 280
            Assert.That(differencer.Deleted, Is.Empty);
151 281
            Assert.That(differencer.Created, Is.Empty);
152 282
            Assert.That(differencer.Changed, Is.Empty);
283
            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
153 284
            Assert.That(differencer.Unchanged, Is.Empty);
154 285
        }
155 286

  
......
161 292
            Assert.That(differencer.Deleted, Is.EquivalentTo(_previous));
162 293
            Assert.That(differencer.Created, Is.Empty);
163 294
            Assert.That(differencer.Changed, Is.Empty);
295
            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
164 296
            Assert.That(differencer.Unchanged, Is.Empty);
165 297
        }
166 298

  
......
181 313
            Assert.That(differencer.Deleted, Is.Empty,"should have no deletions");
182 314
            Assert.That(differencer.Created, Is.Empty,"should have no insertions");
183 315
            Assert.That(differencer.Changed, Is.Empty,"should have no changes");
316
            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
184 317
            Assert.That(differencer.Unchanged, Is.EquivalentTo(_previous),"should be equivalent to previous");
185 318
            
186 319
        }
......
199 332
                                };
200 333
            var deleted = new[]
201 334
                            {
202
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
203
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
204
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1},
205
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1},
335
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="1"},
336
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="2"},
337
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="3"},
338
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="4"},
206 339
                            };
207 340
            var unchanged = new[]{
208
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1},
209
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1},
210
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1},
211
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
212
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
213
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1},
214
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1},
215
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1},
216
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1},
341
                                new ObjectInfo{Account="acc1",Container="Cont1",Name="Folder1/Name1",Bytes=123,Hash="aa4",Version=1,UUID="1"},
342
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="6"},
343
                                new ObjectInfo{Account="acc2",Container="Cont1",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="7"},
344
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="8"},
345
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="9"},
346
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name3",Bytes=123,Hash="aa3",Version=1,UUID="10"},
347
                                new ObjectInfo{Account="acc1",Container="Cont2",Name="Name4",Bytes=123,Hash="aa4",Version=1,UUID="11"},
348
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name1",Bytes=123,Hash="aa1",Version=1,UUID="12"},
349
                                new ObjectInfo{Account="acc2",Container="Cont2",Name="Name2",Bytes=123,Hash="aa2",Version=1,UUID="13"},
217 350
                            };
218 351
            var differencer = d1.Post(_previous)
219 352
                .Post(noModItems);
......
222 355
            Assert.That(differencer.Deleted.ToList(), Is.EquivalentTo(deleted).Using(_comparer), "should have deletions only from acc1/cont1");
223 356
            Assert.That(differencer.Created, Is.Empty,"should have no insertions");
224 357
            Assert.That(differencer.Changed, Is.Empty,"should have no changes");
358
            Assert.That(differencer.Moved, Is.Empty, "should have no moves");
225 359
            Assert.That(differencer.Unchanged, Is.EquivalentTo(unchanged).Using(_comparer),"should be equivalent to previous except the direct leafs of acc1/cont1");
226 360
            
227 361
        }

Also available in: Unified diff