public void DoesItGetTheCorrectIdOfANote() { Note note = new Note("TestTitle", "SampleDescription"); note.UserID = 1; noteDatabaseFunctions.MakeNewNote(note); note.NoteId = noteDatabaseFunctions.ShowAll().Last().NoteId; Assert.AreEqual(note.NoteId, noteDatabaseFunctions.ShowSpecificNote(noteDatabaseFunctions.ShowAll().Last().NoteId).NoteId); noteDatabaseFunctions.DeleteNote(note.NoteId); }
/// <summary> /// A private method for note deletion. Connects the database and presentation layers. /// </summary> private void DeleteNote() { int note_num = ListNotes(); if (note_num == -1) { return; } noteDatabaseFunctions.DeleteNote(note_num); }