public void CreateResponse() { Note note = SandboxProject.CreateNote("New Note", "This is a new Note", false); string noteId = note.ID; Note response = note.CreateResponse("A Response", "Back to you", true); string responseID = response.ID; ResetInstance(); note = Instance.Get.NoteByID(noteId); response = Instance.Get.NoteByID(responseID); Assert.IsTrue(note.Responses.Contains(response)); Assert.AreEqual("A Response", response.Name); Assert.AreEqual("Back to you", response.Content); Assert.IsTrue(response.Personal); Assert.AreEqual(note, response.InResponseTo); ICollection <Note> notes = SandboxProject.GetNotes(null); Assert.IsTrue(notes.Contains(note)); Assert.IsTrue(notes.Contains(response)); }
public void Delete() { Note note = SandboxProject.CreateNote("New Note", "This is a new Note", false); string noteId = note.ID; ResetInstance(); note = Instance.Get.NoteByID(noteId); Assert.IsTrue(note.CanDelete); note.Delete(); ResetInstance(); Assert.IsNull(Instance.Get.NoteByID(noteId)); }