public void GetIncomingNotAuthenticatedTest()
        {
            _authenticationContext.GetContextUser().Returns((string)null);

            var telemetryDataSinkSetupServiceClient = Substitute.For <ITelemetryDataSinkSetupServiceClient>();

            var telemetryMetadataService = new TelemetryMetadataService(telemetryDataSinkSetupServiceClient, null, _authenticationContext);

            telemetryMetadataService.GetIncomingTelemetryDataSinksMetadata();
        }
        public void GetIncomingTest()
        {
            var telemetryDataSinkSetupServiceClient = Substitute.For <ITelemetryDataSinkSetupServiceClient>();

            var msm = new TelemetryDataSinksMetadataDtoClient {
                Incoming = new List <TelemetryDataSinkMetadataDtoClient>()
            };

            telemetryDataSinkSetupServiceClient.GetTelemetryDataSinksMetadata().Returns(msm);

            var messageMetadataService = new TelemetryMetadataService(telemetryDataSinkSetupServiceClient, null, _authenticationContext);

            var incoming = messageMetadataService.GetIncomingTelemetryDataSinksMetadata();

            Assert.AreEqual(0, incoming.Incoming.Count);
        }
Example #3
0
 public TelemetryDataSinksMetadataDto GetTelemetryMetadata() // GET: api/v1/telemetryMetadata
 {
     return(_telemetryMetadataService.GetIncomingTelemetryDataSinksMetadata());
 }