public async Task <IActionResult> Get(string id)
        {
            var result = new ResponseRoot <Canal>
            {
                Data    = await _canalService.GetCanalByIdAsync(id),
                Success = true
            };

            return(Ok(result));
        }
Esempio n. 2
0
        public async Task GetCanalByIdAsync_predicate_Is_Null()
        {
            try
            {
                await _service.GetCanalByIdAsync(null);

                Assert.Fail();
            }
            catch (ArgumentNullException ex)
            {
                Assert.IsTrue(ex.ParamName == _CANAL_ID_PARAM_NAME);
            }
        }