public ActionResult Index(String id)
        {
            IndexModel indexModel = new IndexModel();

            indexModel.User    = ((User)ViewData["User"]);
            indexModel.Project = _projectService.GetProject(id);
            indexModel.Scripts = _scriptService.GetAllProjectGhostRunnerScripts(indexModel.Project.ID);

            return(View(indexModel));
        }
Beispiel #2
0
        public ActionResult GetAddScheduledItemDialog(String projectId)
        {
            AddScheduledItemModel addScheduledItemModel = new AddScheduledItemModel();

            addScheduledItemModel.Project   = _projectService.GetProject(projectId);
            addScheduledItemModel.Sequences = _sequenceService.GetAllSequences(addScheduledItemModel.Project.ID);
            addScheduledItemModel.Scripts   = _scriptService.GetAllProjectGhostRunnerScripts(addScheduledItemModel.Project.ID);

            return(View("Partials/AddScheduledItem", addScheduledItemModel));
        }
Beispiel #3
0
        public ActionResult Sequence(String projectId, String id)
        {
            SequenceModel sequenceModel = new SequenceModel();

            sequenceModel.User            = ((User)ViewData["User"]);
            sequenceModel.Project         = _projectService.GetProject(projectId);
            sequenceModel.Sequence        = _sequenceService.GetSequence(id);
            sequenceModel.SequenceScripts = _sequenceScriptService.GetAllSequenceScripts(id);
            sequenceModel.Scripts         = _scriptService.GetAllProjectGhostRunnerScripts(sequenceModel.Project.ID);

            return(View(sequenceModel));
        }
        public void GetAllProjectScripts()
        {
            IList <IGhostRunnerScript> project1Scripts = _scriptService.GetAllProjectGhostRunnerScripts(1);

            Assert.AreEqual(3, project1Scripts.Count);

            IList <IGhostRunnerScript> project99Scripts = _scriptService.GetAllProjectGhostRunnerScripts(99);

            Assert.AreEqual(0, project99Scripts.Count);
        }