コード例 #1
0
 public MeasurementToEventMessageAsyncCollector(
     IEventHubMessageService eventHubService,
     IHashCodeFactory hashCodeFactory,
     ITelemetryLogger telemetryLogger)
 {
     _eventHubService = EnsureArg.IsNotNull(eventHubService, nameof(eventHubService));
     _hashCodeFactory = EnsureArg.IsNotNull(hashCodeFactory, nameof(hashCodeFactory));
     _telemetryLogger = EnsureArg.IsNotNull(telemetryLogger, nameof(telemetryLogger));
 }
        public MeasurementToEventMessageAsyncCollectorTests()
        {
            _eventHubService = Substitute.For <IEventHubMessageService>();
            _hashCodeFactory = Substitute.For <IHashCodeFactory>();
            _telemetryLogger = Substitute.For <ITelemetryLogger>();

            _measurementCollector = new MeasurementToEventMessageAsyncCollector(_eventHubService, _hashCodeFactory, _telemetryLogger);
            _hashCodeGenerator    = Substitute.For <IHashCodeGenerator>();
            _hashCodeGenerator.GenerateHashCode(Arg.Any <string>()).Returns("123");
            _hashCodeFactory.CreateDeterministicHashCodeGenerator().Returns(_hashCodeGenerator);
        }
コード例 #3
0
 public MeasurementToEventMessageAsyncCollector(IEventHubMessageService eventHubService)
 {
     _eventHubService = EnsureArg.IsNotNull(eventHubService, nameof(eventHubService));
 }