Beispiel #1
0
        public async Task AddNewRangeAsync_WithDuplicates_DuplicatesAreNotAdded()
        {
            const string duplicatePath = "a";
            var          uploadList    = new UploadList(_helpers)
            {
                new UploadFile {
                    FullPath = duplicatePath
                },
                new UploadFile {
                    FullPath = "b"
                },
            };

            var addFiles = new List <string> {
                duplicatePath, "c"
            };

            await uploadList.AddNewRangeAsync(addFiles);

            Assert.That(uploadList.Count, Is.EqualTo(3));
            Assert.That(uploadList.Count(x => x.FullPath == duplicatePath), Is.EqualTo(1));
        }