public void TestIndex()
        {
            var controller = new SellerController();
            var result     = controller.Index() as ViewResult;

            Assert.AreEqual("Index", result.ViewName);
        }
        public void TestDetails()
        {
            var controller = new SellerController();
            var result     = controller.Details(3) as ViewResult;
            var model      = result.Model as Seller;

            Assert.AreEqual("Sabrina Mobassira", model.Name);
        }
        public void TestDelete()
        {
            var    db         = new ApplicationDbContext();
            Seller seller     = db.Sellers.Where(p => p.Name == "Sabrina").AsNoTracking().FirstOrDefault();
            var    controller = new SellerController();
            var    result     = controller.DeleteConfirmed(seller.SellerID) as JsonResult;

            Assert.AreEqual("success", result.Data.ToString());
        }
        public void TestCreate()
        {
            Seller customer = new Seller {
                Name = "Sabrina", PhoneNumber = "01715321061", EmailAddress = "*****@*****.**"
            };
            var seller = new SellerController();
            var result = seller.Create(customer) as JsonResult;

            Assert.AreEqual("success", result.Data.ToString());
        }