public void GetAllSchoolTest()
        {
            List <SchoolDetailsDto> schools      = _schoolController.Get().Result.ToList();
            List <SchoolDetailsDto> schoolDetail = SchoolAutoMapper.Mapper().Map <List <SchoolDetailsDto> >(_schoolDetails.Result.ToList());

            Assert.IsTrue(schools.GetType().Equals(schoolDetail.GetType()));
        }
Example #2
0
        public void GetTest()
        {
            School v = new School();

            using (var context = new DataContext(_seed, DBTypeEnum.Memory))
            {
                v.SchoolCode = "G15";
                v.SchoolName = "I8KN8vsf2";
                v.SchoolType = Ray.BiliBiliToolPro.AdminWeb.Model.SchoolTypeEnum.PUB;
                v.Remark     = "cRS";
                context.Set <School>().Add(v);
                context.SaveChanges();
            }
            var rv = _controller.Get(v.ID.ToString());

            Assert.IsNotNull(rv);
        }