Exemple #1
0
        public void DetailsTest()
        {
            Device v = new Device();

            using (var context = new DataContext(_seed, DBTypeEnum.Memory))
            {
                v.ID        = "44tvMxOP9";
                v.ProductId = AddProduct();
                context.Set <Device>().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());
        }