Esempio n. 1
0
        public void Add_WithDuplicate_DoesNotAddFile()
        {
            var uploadList = new UploadList(_helpers);
            var file1      = new UploadFile {
                FullPath = "a"
            };
            var file2 = new UploadFile {
                FullPath = "a"
            };

            uploadList.AddIfNotDuplicate(file1);
            uploadList.AddIfNotDuplicate(file2);

            Assert.That(uploadList.Count, Is.EqualTo(1));
        }
Esempio n. 2
0
        public void AddAddIfNotDuplicate_AddsFile()
        {
            var uploadList = new UploadList(_helpers);
            var file       = new UploadFile {
                FullPath = "foo.jpg"
            };

            uploadList.AddIfNotDuplicate(file);

            Assert.That(uploadList.Count, Is.EqualTo(1));
            Assert.That(uploadList[0], Is.EqualTo(file));
        }