public void DetailsTest() { School v = new School(); using (var context = new DataContext(_seed, DBTypeEnum.Memory)) { v.SchoolCode = "ece"; v.SchoolName = "QZ8AgkqPf"; context.Set <School>().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()); }