public void TestGetAllDepartments() { List <string> result = CourseLogic.GetAllDepartments(testCourseList); Assert.IsNotNull(result); Assert.IsTrue(result.Contains("Test Department 1")); Assert.IsTrue(result.Contains("Test Department 2")); }
public async Task <List <string> > GetAllDepartments() { List <string> departmentList = new List <string>(); var courses = await _context.ScanAsync <Course>(new List <ScanCondition>()).GetRemainingAsync(); if (courses != null) { departmentList = CourseLogic.GetAllDepartments(courses); } else { throw new SimpliPassException("Failed to get Courses Table."); } return(departmentList); }
public void TestGetAllDepartmentsNull() { List <string> result = CourseLogic.GetAllDepartments(null); Assert.IsNull(result); }