public IActionResult Get(int id) { var action = _actionRepository.GetById(id); if (action == null) { return(NotFound()); } return(Ok(action)); }
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"))); }
public void GetById() { Assert.IsNotNull(myActionRepository.GetById(8)); }