Esempio n. 1
0
        public void Edit_Note(object sender, RoutedEventArgs e)
        {
            Edit_Note_Container.Visibility = Visibility.Collapsed;
            Note note_item = (Note)Notes_Listbox.SelectedItem;

            note_repo.Edit(note_item.NoteId, Edit_Note_textbox.Text);
            _DataBindNotes(Notes_Listbox);
        }
Esempio n. 2
0
        public void TestNoteEdit()
        {
            int project_id = project_repo.All()[0].ProjectId;

            note_repo.Add(new Note("this is a test note", project_id));
            note_repo.Add(new Note("this is note 2", project_id));

            Note note = note_repo.GetAllByProjectId(project_id)[1];

            Assert.AreEqual(note.NoteDetails, "this is note 2");

            note_repo.Edit(note.NoteId, "this is note 2 - edited");

            Note note_edited = note_repo.GetAllByProjectId(project_id)[1];

            Assert.AreEqual("this is note 2 - edited", note_edited.NoteDetails);
        }