public async void Update_phase_valid_input_Integration() { var phase = new PhaseDTO(); var results = await _phaseLogic.Update(phase); Assert.Equal(true, results); }
public void Update_phase_valid_input() { var phase = new PhaseDTO(); _phaseDtoRepository.Setup(a => a.UpdateAsync(It.IsAny <PhaseDTO>())).ReturnsAsync(true); var results = _phaseLogic.Update(phase).Result; Assert.Equal(true, results); }
public async Task <IActionResult> UpdatePhase([FromBody] PhaseDTO phase) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var update = await _phaseLogic.Update(phase); if (update) { return(NoContent()); } return(NotFound()); }