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()); }
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); }
public void Add(Folder folder) { _folderRepository.Add(folder); }