Beispiel #1
0
        public HomeController()
        {
            var context = new SchoolDataEntities1();

            requestRepo = new RequestRepository(context);
            courseRepo  = new CourseRepository(context);
            stateRepo   = new StateRepository(context);
        }
        public void GetById_Request()
        {
            //arrange
            int id = 1;

            SchoolDataEntities1 context     = new SchoolDataEntities1();
            RequestRepository   requestRepo = new RequestRepository(context);

            //act
            Request request = requestRepo.GetById(id);

            //assert
            Assert.AreEqual(id, request.Id);
            Assert.IsInstanceOfType(request, typeof(Request));
        }
        public RequestController()
        {
            var context = new SchoolDataEntities1();

            requestRepo = new RequestRepository(context);
        }
Beispiel #4
0
        public CourseController()
        {
            var context = new SchoolDataEntities1();

            courseRepo = new CourseRepository(context);
        }
Beispiel #5
0
        public StateController()
        {
            var context = new SchoolDataEntities1();

            stateRepo = new StateRepository(context);
        }