public async Task <IActionResult> GetModule(int id) { try { var module = await _modulesService.GetModule(id); return(Ok(module)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }
public async Task When_GettingModule_Expect_CorrectModule(int moduleId) { var module = await _modulesService.GetModule(moduleId); Assert.Equal("Analysis of Algorithms", module.Name); }