Пример #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);
        }