예제 #1
0
        public IActionResult Get(int id)
        {
            var action = _actionRepository.GetById(id);

            if (action == null)
            {
                return(NotFound());
            }
            return(Ok(action));
        }
예제 #2
0
        public void Save()
        {
            Script myScript = new Script();

            myScript.Name        = "Prueba";
            myScript.Description = "Prueba";

            List <Action> myActionList = new List <Model.Action>();

            myActionList.Add(myActionRepository.GetById(8));
            myScriptRepository.Save(myScript, myActionList);

            Assert.IsTrue(myScriptRepository.GetAll().Any(item => item.Name.Equals("Prueba")));
        }
예제 #3
0
 public void GetById()
 {
     Assert.IsNotNull(myActionRepository.GetById(8));
 }