Esempio n. 1
0
        public ActionResult DeleteScript(int exerciseId, int scriptId)
        {
            var result = _exerciseService.DeleteVariableData(exerciseId, scriptId);

            if (result == false)
            {
                return(Forbid());
            }
            return(Ok());
        }
Esempio n. 2
0
        public void ScriptDelete()
        {
            var exerciseId = ExerciseCreate();
            var scriptId   = CreateScript(exerciseId);
            var script1    = _exerciseService.GetVariableData(exerciseId, scriptId);

            Assert.NotNull(script1);
            _exerciseService.DeleteVariableData(exerciseId, scriptId);
            var script2 = _exerciseService.GetVariableData(exerciseId, scriptId);

            Assert.Null(script2);
        }