public MetricCollectionServiceShould()
 {
     this.fakeMonitoringResource = A.Fake <IMonitoringApiClient>();
     this.fakeMetricsAggregator  = A.Fake <MetricsAggregator>();
     this._fakeMetricsRequest    = BuildMetricRequest();
     this.sut = new MetricCollectionService(this.fakeMonitoringResource, this.fakeMetricsAggregator);
 }
Esempio n. 2
0
        public MonitoringResourceClientShould()
        {
            this.testUri                   = new Uri("https://management.azure.com");
            this.fakeHttpClient            = A.Fake <IHttpClient>();
            this.fakeSecurityTokenProvider = A.Fake <ISecurityTokenProvider>();
            this.fakeMetricRequest         = BuildMetricRequest();
            SetupFakeHttpResponseMessage(new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = GetTestContent(new MetricsResponse()
                {
                    Metrics = GetMetricValues()
                })
            });

            this.sut = new MonitoringApiClient(this.fakeSecurityTokenProvider, this.fakeHttpClient);
        }
 public MetricCollectionService(IMonitoringApiClient monitoringResourceClient, MetricsAggregator metricsAggregator)
 {
     this.monitoringResourceClient = monitoringResourceClient;
     this.metricsAggregator        = metricsAggregator;
 }