Ejemplo n.º 1
0
        public void DetailsTest()
        {
            Hospital v = new Hospital();

            using (var context = new DataContext(_seed, DBTypeEnum.Memory))
            {
                v.Name = "P2yWI";
                context.Set <Hospital>().Add(v);
                context.SaveChanges();
            }
            PartialViewResult rv = (PartialViewResult)_controller.Details(v.ID.ToString());

            Assert.IsInstanceOfType(rv.Model, typeof(IBaseCRUDVM <TopBasePoco>));
            Assert.AreEqual(v.ID, (rv.Model as IBaseCRUDVM <TopBasePoco>).Entity.GetID());
        }