public void GetAll__InsertOneRow__ReturnsListOfOne() { File file = new File(); file.Name = "Test File"; file.ParenFolderId = -1; file.IsActive = true; file.FileExt = ".txt"; file.FileSizeInKB = 100; file.CreatedBy = 1; file.UploadedOn = DateTime.Now; file.Id = dao.Insert(file); var list = dao.GetAll(); Assert.AreEqual(1, list.Count); }
public static int Save(this File file) { FileDAO dao = new FileDAO(); return(dao.Insert(file)); }