public ActionResult PostPriority([FromBody] PriorityDto priorityDto) { var response = _service.Add(priorityDto); _service.Save(response); return(new OkObjectResult(response["Output"])); }
public void AddPriority() { _service.Add(new PriorityDto { Id = "3", Name = "name3" }); _service.Save(_dbContextMock); var result = _service.GetAll(); var count = result.Count(); Assert.AreEqual(3, count); var addedEntity = result.Find(x => x.Name == "name3"); Assert.NotNull(addedEntity); }