public async Task Update_WhenCalled_ShouldWork() { var expected = "1234567890"; var skillDto = new SkillDto { Id = expected }; _mockAdapter.Setup(_ => _.Update(It.IsAny <SkillDto>())).Returns(Task.FromResult(skillDto)); var repository = new SkillsRepository(_mockAdapter.Object, _mockLogger.Object); var actual = await repository.Update(skillDto); Assert.IsAssignableFrom <SkillDto>(actual); Assert.Equal(expected, actual.Id); }
public IActionResult Put([FromBody] Skills item) { _repository.Update(item); return(Ok()); }
public void Put(int id, [FromBody] Skills item) { _repository.Update(item); }