Beispiel #1
0
 public void GetItems()
 {
     using (TransactionScope scope = new TransactionScope())
     {
         if (MappingController.DeleteAllMappings())
         {
             if (MappingController.DeleteAllMappingSystems())
             {
                 if (MappingController.DeleteAllMappingPropertyAssociations())
                 {
                     if (MappingController.DeleteAllMappingClassAssociations())
                     {
                         Mapping mapping = PopulateMappingItem();
                         mapping.Id = MappingController.SaveMapping(mapping);
                         if (mapping.Id != -1)
                         {
                             List <Mapping> mappings = MappingController.GetMappings();
                             //so the count should be >0
                             Assert.IsTrue(mappings.Count > 0);
                             //check for our new id
                             Assert.IsTrue(mappings.Find(delegate(Mapping currentItem)
                             {
                                 return(currentItem.Id == mapping.Id);
                             }) != null);
                         }
                     }
                 }
             }
         }
     }
 }