Example #1
0
 public void GetItems()
 {
     using (TransactionScope scope = new TransactionScope())
     {
         //add a region
         int id = OptrakRegionController.SaveRegion(PopulateNewItem());
         if (id > -1)
         {
             //retrieve all regions and the one we saved should return at least
             List <OptrakRegion> regions = OptrakRegionController.GetRegions();
             //so the count should be >0
             Assert.IsTrue(regions.Count > 0);
             //check for our new id
             Assert.IsTrue(regions.Find(delegate(OptrakRegion currentItem)
             {
                 return(currentItem.Id == id);
             }) != null);
         }
     }
 }
Example #2
0
 internal int SaveItem(OptrakRegion optrakRegion)
 {
     return(OptrakRegionController.SaveRegion(optrakRegion));
 }