Example #1
0
        public async Task <ActionResult <bool> > Delete([FromRoute] int id, bool isTest = false)
        {
            try
            {
                var isDeleted = await repository.DeletePlacementDescriptionAsync(id);

                return(Ok(isDeleted));
            }
            catch (ArgumentException e)
            {
                Util.LogError(e, isTest);
                return(StatusCode(StatusCodes.Status404NotFound));
            }
            catch (Exception e)
            {
                Util.LogError(e, isTest);
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }
        public async Task DeletePlacementDescription_returns_true()
        {
            var actual = await repository.DeletePlacementDescriptionAsync(1);

            Assert.True(actual);
        }