Ejemplo n.º 1
0
 public MockUserRepository(MockDataProvider dataProvider = null)
 {
     if (dataProvider == null)
     {
         Users = new Dictionary <string, User>();
     }
     else
     {
         Users = dataProvider.Users;
     }
 }
 public MockCustomMaterialPropRepository(MockDataProvider mockDataProvider = null)
 {
     if (mockDataProvider == null)
     {
         Props = new Dictionary <Guid, CustomMaterialProp>();
     }
     else
     {
         Props = mockDataProvider.CustomMaterialProps;
     }
 }
Ejemplo n.º 3
0
 public MockPlasticsRepository(MockDataProvider mockDataProvider = null)
 {
     if (mockDataProvider == null)
     {
         Plastics = new Dictionary <string, Plastic>();
     }
     else
     {
         Plastics = mockDataProvider.Plastics;
     }
 }
 public MockTransactionRepository(MockDataProvider mockDataProvider = null)
 {
     if (mockDataProvider == null)
     {
         BatchTransactions = new Dictionary <Guid, List <Transaction> >();
     }
     else
     {
         BatchTransactions = mockDataProvider.BatchTransactions;
     }
 }
Ejemplo n.º 5
0
 public MockApiKeyRepository(MockDataProvider mockDataProvider = null)
 {
     if (mockDataProvider == null)
     {
         ApiKeys = new Dictionary <Guid, ApiKey>();
     }
     else
     {
         ApiKeys = mockDataProvider.ApiKeys;
     }
 }
Ejemplo n.º 6
0
 public MockMaterialBatchRepository(MockDataProvider mockDataProvider = null)
 {
     if (mockDataProvider == null)
     {
         MaterialBatches = new Dictionary <Guid, MaterialBatch>();
     }
     else
     {
         MaterialBatches = mockDataProvider.MaterialBatches;
     }
 }
 public MockLocationsRepository(MockDataProvider dataProvider = null)
 {
     StorageAreas = new Dictionary <Guid, StorageArea>();
     if (dataProvider == null)
     {
         StorageSites = new Dictionary <Guid, StorageSite>();
     }
     else
     {
         StorageSites = dataProvider.StorageSites;
         foreach (StorageSite site in StorageSites.Values)
         {
             foreach (StorageArea area in site.Areas)
             {
                 StorageAreas.Add(area.Id, area);
             }
         }
     }
 }
 public MockMaterialsRepository(MockCustomMaterialPropValueRepository customMaterialPropValueRepository, MockDataProvider mockDataProvider = null)
 {
     CustomMaterialPropValueRepository = customMaterialPropValueRepository;
     if (mockDataProvider == null)
     {
         Materials = new Dictionary <int, Material>();
         LastId    = 0;
     }
     else
     {
         Materials = mockDataProvider.Materials;
         LastId    = Materials.Keys.Max();
     }
 }