public async Task TestGetAllDepartments() { try { var result = await _client.GetAllDepartments(); } catch (NullReferenceException e) { //Cannot fully test current version of AWS SDK. } _context.Verify(c => c.ScanAsync <Course>(It.IsAny <List <ScanCondition> >(), It.IsAny <DynamoDBOperationConfig>()), Times.Once); }
public async Task <List <string> > GetAllDepartments() { _logger.LogInformation("Begin CoursesController GET All Departments"); var items = await _dbClient.GetAllDepartments(); _logger.LogInformation("Finish CoursesController GET All Departments"); return(items); }