public ActionResult RemoveFolder(int?id, int projectId) { if (id == null) { return(View()); } folderrepository.RemoveFolderByID((int)id); return(RedirectToAction("Index", "Project", new { id = projectId })); }
public void TestRemoveFolder() { //Arrange var newFolder = new Folder() { ID = 6, Name = "Folder6", IsRoot = false, SubFolders = new List <Folder>(), Files = new List <File>() }; _folder.AddFolder(newFolder); //Act _folder.RemoveFolderByID(newFolder.ID); var getFolder = _folder.GetFolderByID(newFolder.ID); //Assert Assert.IsNull(getFolder); }