public void AddFolderTest()
        {
            var auxFolder = new Folder {
                Name = "Pepe", Id = 4
            };

            folderRepository.Add(auxFolder);

            mockSet.Verify(v => v.Add(It.IsAny <Folder>()), Times.Once());
            mockContext.Verify(e => e.SaveChanges(), Times.Once());
        }
Esempio n. 2
0
        public void AddCorrectlyAddedFolder()
        {
            var Folder = new Folder {
                ProjectID = 1,
                ParentID  = 1,
                Name      = "NewNestedTestFolder"
            };

            var repo = new FolderRepository(_context);

            repo.Add(Folder);
            var res = repo.Find(Folder.Id);

            Assert.Equal(Folder, res);
        }
Esempio n. 3
0
 public void Add(Folder folder)
 {
     _folderRepository.Add(folder);
 }