public void Create_Personal() { var a = this.CreateAccount(); var folder = new PersonalTaskFolder("default", a); Assert.Throws(typeof(AssertionException), () => folder.SetName(null)); this._taskFolderService.Create(folder); this.Evict(folder); var folder2 = this._taskFolderService.GetTaskFolder(folder.ID); Assert.IsInstanceOf <PersonalTaskFolder>(folder2); Assert.AreEqual(folder.Name, folder2.Name); Assert.AreEqual(a.ID, (folder2 as PersonalTaskFolder).OwnerAccountId); }
public void Update_Personal() { var a = this.CreateAccount(); var folder = new PersonalTaskFolder("default", a); this._taskFolderService.Create(folder); this.Evict(folder); folder = this._taskFolderService.GetTaskFolder(folder.ID) as PersonalTaskFolder; folder.SetName("abc"); this._taskFolderService.Update(folder); this.Evict(folder); folder = this._taskFolderService.GetTaskFolder(folder.ID) as PersonalTaskFolder; Assert.AreEqual("abc", folder.Name); }