public void PostCreateShouldSaveCustomerAndReturnDetailsView()
        {
            var customersController = new CustomersController();
            var customer = new Customer
            {
                Name = "Hugo Reyes",
                Email = "*****@*****.**",
                Phone = "720-123-5477"
            };

            var result = customersController.Create(customer) as ViewResult;

            Assert.IsNotNull(result);
            Assert.AreEqual("Details", result.ViewName);
            Assert.IsInstanceOfType(result.ViewData.Model, typeof(Customer));

            customer = result.ViewData.Model as Customer;
            Assert.IsNotNull(customer);
            Assert.IsTrue(customer.Id > 0);
        }
 public void Create(Customer customer)
 {
     customer.Id = new Random().Next(1, 2500);
 }