Пример #1
0
        public void UpdateProject()
        {
            if (!Settings.ModifyTests)
            {
                return;
            }
            Project p           = Project.GetProject(Api, Settings.TestProject).Result;
            string  description = "Test altered description 1";
            Project changed     = p.Update(Api, p.name, description).Result;

            Assert.AreEqual(description, changed.description);
            description = p.description == description ? "Test original description" : p.description;
            changed     = p.Update(Api, p.name, description).Result;
            Assert.AreEqual(description, changed.description);
        }
Пример #2
0
        public void Test5_UpdateOneProject()
        {
            DateTime Date        = new DateTime(2016, 10, 3);
            Project  testProject = new Project("ProjectName", Date);

            testProject.Save();

            DateTime Date2      = new DateTime(2017, 10, 3);
            Project  newProject = new Project("NewProjectName", Date2, testProject.GetId());

            testProject.Update(newProject);

            Assert.Equal(testProject, newProject);
        }