Exemplo n.º 1
0
        public async Task GetCourseAsync_ShouldReturnCorrectCourse()
        {
            var testCourses = _inMemoryRep.GetAll() as List <Course>;
            var controller  = new CourseController(_inMemoryRep);

            var result = await controller.GetCourseAsync(4) as OkNegotiatedContentResult <Course>;

            Assert.IsNotNull(result);
            Assert.AreEqual(testCourses[3].Title, result.Content.Title);
        }