public void FolderDuplicateReturnedForSelfFinding() { var builder = new FileDescriptorBuilder("A", 1, new FileDescriptorBuilder("B1", 2), new FileDescriptorBuilder("C1", 3, new FileDescriptorBuilder("D1", 4, new FileDescriptorBuilder("E1", 5))), new FileDescriptorBuilder("X", 10, new FileDescriptorBuilder("B2", 11), new FileDescriptorBuilder("C2", 3, new FileDescriptorBuilder("D2", 4, new FileDescriptorBuilder("E2", 5))))); var db = new MemoryFileDatabase(builder.Build()); var sut = new TopDescriptorDuplicateFinder(new StatDuplicateComparer()); var actual = sut.Find(db, db).ToList(); Assert.That(actual, Has.Count.EqualTo(1)); Assert.That(actual.Single().Descriptors.Select(x => x.Name), Is.EquivalentTo(new [] {"C1", "C2"})); }
public FileDescriptorBuilder AddChild(string childName, byte hash) { var builder = new FileDescriptorBuilder(childName, hash); children.Add(builder); return builder; }