Esempio n. 1
0
        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"));
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public void TestGetAllDepartmentsNull()
        {
            List <string> result = CourseLogic.GetAllDepartments(null);

            Assert.IsNull(result);
        }