Example #1
0
        public void Edit_Dependency(object sender, RoutedEventArgs e)
        {
            Edit_Dependency_Container.Visibility = Visibility.Collapsed;
            Dependency dependency_item = (Dependency)Dependency_Listbox.SelectedItem;

            dependency_repo.Edit(dependency_item.DependencyId, Edit_Dependency_textbox.Text);
            _DataBindDependencies(Dependency_Listbox);
        }
Example #2
0
        public void TestDependencyEdit()
        {
            int project_id = project_repo.All()[0].ProjectId;

            dependency_repo.Add(new Dependency("this is a test note", project_id));
            dependency_repo.Add(new Dependency("this is note 2", project_id));

            Dependency note = dependency_repo.GetAllByProjectId(project_id)[1];

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

            dependency_repo.Edit(note.DependencyId, "this is note 2 - edited");

            Dependency note_edited = dependency_repo.GetAllByProjectId(project_id)[1];

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