public void DetailsTest() { Area v = new Area(); using (var context = new DataContext(_seed, DBTypeEnum.Memory)) { v.AreaName = "AyD9qo"; v.ParentId = AddParent(); context.Set <Area>().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()); }