public bool Update(Village village,int id)
        {
            var element= villageCollection.Where(x => x.Id == village.Id).FirstOrDefault();

            return true;
            
        }
 public void Update()
 {
     var village = new Village
     {
         Id = 200,
         Name = "Octupus",
         Film = "Spiderman 2"
     };
     Assert.IsTrue(service.Update(village,200));
 }
 public void Insert()
 {
     var village = new Village
     {
         Id = 200,
         Name = "Octupus",
         Film = "Spiderman 2"
     };
     Assert.IsTrue(service.Insert(village));
 }
 public bool UpdateTest(
     [PexAssumeUnderTest]VillageServiceMock target,
     Village village,
     int id
 )
 {
     bool result = target.Update(village, id);
     return result;
     // TODO: add assertions to method VillageServiceMockTest.UpdateTest(VillageServiceMock, Village, Int32)
 }
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                var village = new Village
                {
                    Film = collection["Film"].ToString(),
                    Name = collection["Name"].ToString(),
                    Photo = collection["Photo"].ToString()
                };

                service.Insert(village);
                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                var village = new Village
                {
                    Film = collection["Film"].ToString(),
                    Name = collection["Name"].ToString(),
                    Photo = collection["Photo"].ToString()
                };

                service.Update(village,id);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
 public bool Insert(Village village)
 {
     villageCollection.Add(village);
     return true;
 }
 public bool InsertTest([PexAssumeUnderTest]VillageServiceMock target, Village village)
 {
     bool result = target.Insert(village);
     return result;
     // TODO: add assertions to method VillageServiceMockTest.InsertTest(VillageServiceMock, Village)
 }