public void testInitialize()
        {
            _fixture = new Fixture();
            _fixture.Customizations.Add(new VirtualMembersOmitter());

            _create = _fixture.Create<Create>();
            _validationContext = new ValidationContext(_create, null, null);
            _validationResults = new List<ValidationResult>();
        }
Ejemplo n.º 2
0
 public virtual ActionResult Create(Create create)
 {
     if (ModelState.IsValid)
     {
         var restaurant = Mapper.Map<Restaurant>(create);
         _restaurantRepository.Add(restaurant);
         return RedirectToAction(Views.ViewNames.Index);
     }
     return View("");
 }