public ReportedPropertyUpdateJobFixture()
        {
            var edgeServiceMock = new Mock <IEdgeService>();

            edgeServiceMock
            .Setup(i => i.SetTwinReportedState(It.IsAny <Dictionary <string, object> >(), It.IsAny <CancellationToken>()))
            .Returns((Dictionary <string, object> d, CancellationToken token) =>
            {
                _reportedProperties = d;
                return(Task.CompletedTask);
            });

            var schedulerServiceMock = new Mock <ISchedulerService>();

            var publisherApiServiceMock = new Mock <IPublisherApiService>();

            var tokenSource = new CancellationTokenSource();

            _module = new Module()
            {
                State = ModuleState.Online
            };

            _jobDependencyLocator = new JobDependencyLocator(edgeServiceMock.Object, schedulerServiceMock.Object, publisherApiServiceMock.Object, _module, tokenSource);
        }
        public CancelSubscriptionJobFixture()
        {
            var edgeServiceMock = new Mock <IEdgeService>();

            var schedulerServiceMock = new Mock <ISchedulerService>();

            var publisherApiServiceMock = new Mock <IPublisherApiService>();

            publisherApiServiceMock
            .Setup(i => i.Subscribe(It.IsAny <Publisher>(), It.IsAny <CancellationToken>()))
            .Returns((Publisher p, CancellationToken token) =>
            {
                return(Task.FromResult(p.Id));
            });


            var tokenSource = new CancellationTokenSource();

            _module = new Module();
            _jobDependencyLocator = new JobDependencyLocator(edgeServiceMock.Object, schedulerServiceMock.Object, publisherApiServiceMock.Object, _module, tokenSource);
        }
 public TelemetriesController(JobDependencyLocator jobDependencyLocator)
 {
     _jobDependencyLocator = jobDependencyLocator;
 }
 public InitializerService(ModuleClient moduleClient, JobDependencyLocator jobDependencyLocator, CancellationTokenSource tokenSource)
 {
     _moduleClient         = moduleClient;
     _jobDependencyLocator = jobDependencyLocator;
     _tokenSource          = tokenSource;
 }
Ejemplo n.º 5
0
 public SubscribeJob(JobDependencyLocator jobDependencies, Publisher publisher)
 {
     _jobDependencies = jobDependencies;
     _publisher       = publisher;
 }
Ejemplo n.º 6
0
 public HeartbeatsController(JobDependencyLocator jobDependencyLocator)
 {
     _jobDependencyLocator = jobDependencyLocator;
 }
Ejemplo n.º 7
0
 public ReportedPropertyUpdateJob(JobDependencyLocator jobDependencies)
 {
     _jobDependencies = jobDependencies;
 }
 public HealthCheckJob(JobDependencyLocator jobDependencies, ElapsedScheduleMessage elapsedScheduleMessage)
 {
     _jobDependencies        = jobDependencies;
     _elapsedScheduleMessage = elapsedScheduleMessage;
 }
 public HeartbeatReceivedJob(JobDependencyLocator jobDependencies, PublisherHeartbeat publisherHeartbeat)
 {
     _jobDependencies    = jobDependencies;
     _publisherHeartbeat = publisherHeartbeat;
 }
Ejemplo n.º 10
0
 public DesiredPropertyChangedJob(JobDependencyLocator jobDependencies, TwinCollection twinCollection)
 {
     _jobDependencies = jobDependencies;
     _twinCollection  = twinCollection;
 }
 public CancelSubscriptionJob(JobDependencyLocator jobDependencies, Publisher publisher)
 {
     _jobDependencies = jobDependencies;
     _publisher       = publisher;
 }
Ejemplo n.º 12
0
 public TelemetryReceivedJob(JobDependencyLocator jobDependencies, PublisherTelemetryMessage telemetryMessage)
 {
     _jobDependencies  = jobDependencies;
     _telemetryMessage = telemetryMessage;
 }
Ejemplo n.º 13
0
 public RoutingJob(JobDependencyLocator jobDependencies)
 {
     _jobDependencies = jobDependencies;
 }