Beispiel #1
0
 public TableStorageService(
     ICloudTableRepository <LocationEntity> locationRepository,
     ICloudTableRepository <ProviderEntity> providerRepository,
     ICloudTableRepository <QualificationEntity> qualificationRepository,
     ILogger <TableStorageService> logger)
 {
     _locationRepository      = locationRepository ?? throw new ArgumentNullException(nameof(locationRepository));
     _providerRepository      = providerRepository ?? throw new ArgumentNullException(nameof(providerRepository));
     _qualificationRepository = qualificationRepository ?? throw new ArgumentNullException(nameof(qualificationRepository));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Beispiel #2
0
    private static TableStorageService BuildTableStorageService(
        ICloudTableRepository <LocationEntity> locationRepository           = null,
        ICloudTableRepository <ProviderEntity> providerRepository           = null,
        ICloudTableRepository <QualificationEntity> qualificationRepository = null,
        ILogger <TableStorageService> logger = null)
    {
        locationRepository ??= Substitute.For <ICloudTableRepository <LocationEntity> >();
        providerRepository ??= Substitute.For <ICloudTableRepository <ProviderEntity> >();
        qualificationRepository ??= Substitute.For <ICloudTableRepository <QualificationEntity> >();
        logger ??= Substitute.For <ILogger <TableStorageService> >();

        return(new TableStorageService(
                   locationRepository,
                   providerRepository,
                   qualificationRepository,
                   logger));
    }