Пример #1
0
        public ActionResult UpdateSequence(String id, EditSequenceModel editSequenceModel)
        {
            Sequence sequence = _sequenceService.GetSequence(id);

            String projectId = sequence.Project.ExternalId;

            _sequenceService.UpdateSequence(id, editSequenceModel.Sequence.Name, editSequenceModel.Sequence.Description);

            return(RedirectToAction("Sequence/" + projectId + "/" + id, "Sequences"));
        }
Пример #2
0
        public void UpdateSequence()
        {
            Sequence sequenceBefore = _sequenceService.GetSequence("c2f5f76a-1ee7-4f92-9150-55de4cefa76f");

            Assert.IsNotNull(sequenceBefore);
            Assert.AreEqual("Test Sequence 1", sequenceBefore.Name);
            Assert.AreEqual("Sequence used for testing", sequenceBefore.Description);

            _sequenceService.UpdateSequence("c2f5f76a-1ee7-4f92-9150-55de4cefa76f", "new sequence name", "new sequence desc");

            Sequence sequenceAfter = _sequenceService.GetSequence("c2f5f76a-1ee7-4f92-9150-55de4cefa76f");

            Assert.IsNotNull(sequenceAfter);
            Assert.AreEqual("new sequence name", sequenceAfter.Name);
            Assert.AreEqual("new sequence desc", sequenceAfter.Description);
        }