Пример #1
0
        public void DeleteSequence()
        {
            Sequence sequenceBefore = _sequenceService.GetSequence("c2f5f76a-1ee7-4f92-9150-55de4cefa76f");

            Assert.IsNotNull(sequenceBefore);

            _sequenceService.DeleteSequence("c2f5f76a-1ee7-4f92-9150-55de4cefa76f");

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

            Assert.IsNull(sequenceAfter);
        }
Пример #2
0
        public ActionResult DeleteSequence(String id, ConfirmDeleteSequenceModel confirmDeleteScriptModel)
        {
            Sequence sequence = _sequenceService.GetSequence(id);

            if (sequence != null)
            {
                String projectId = sequence.Project.ExternalId;

                _sequenceService.DeleteSequence(id);

                return(RedirectToAction("Index/" + projectId, "Sequences"));
            }
            else
            {
                return(RedirectToAction("Index", "Main"));
            }
        }