示例#1
0
        public async Task <IActionResult> GetModule(int id)
        {
            try
            {
                var module = await _modulesService.GetModule(id);

                return(Ok(module));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
示例#2
0
        public async Task When_GettingModule_Expect_CorrectModule(int moduleId)
        {
            var module = await _modulesService.GetModule(moduleId);

            Assert.Equal("Analysis of Algorithms", module.Name);
        }