示例#1
0
        public async void Update_phase_valid_input_Integration()
        {
            var phase = new PhaseDTO();

            var results = await _phaseLogic.Update(phase);

            Assert.Equal(true, results);
        }
示例#2
0
        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);
        }
示例#3
0
        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());
        }