public void AddRange_WithDuplicate_DuplicatesAreNotAdded() { var uploadList = new UploadList(_helpers); const string duplicatePath = "a"; var duplicate = new UploadFile() { FullPath = duplicatePath }; var addFiles1 = new List <UploadFile> { new UploadFile() { FullPath = duplicatePath }, new UploadFile() { FullPath = "b" }, }; var addFiles2 = new List <UploadFile> { duplicate, new UploadFile() { FullPath = "c" }, }; uploadList.AddRange(addFiles1); uploadList.AddRange(addFiles2); Assert.That(uploadList.Count, Is.EqualTo(3)); Assert.That(uploadList, Does.Not.Contain(duplicate)); }
public void AddRange_FilesAreAdded() { var uploadList = new UploadList(_helpers); var addFiles = new List <UploadFile> { new UploadFile() { FullPath = "a" }, new UploadFile() { FullPath = "b" }, }; uploadList.AddRange(addFiles); Assert.That(uploadList.ToList(), Is.EqualTo(addFiles)); }