public void TestGetMostRecentMarginalCarbonEmissionsResult()
        {
            // Arrange
            var regionAbbreviation = "PJM";
            EmissionsApiInteraction emissionsApiInteraction = new EmissionsApiInteraction(selfThrottlingMethod, maxNumberOfCallsPerMinute);

            // Act
            var pointsReturned = emissionsApiInteraction.GetMostRecentMarginalCarbonEmissionsResult(this.wattTimeApiUrl, regionAbbreviation, null, wattTimeApiKey);

            // Assert
            Assert.IsTrue(pointsReturned.marginal_carbon.value > -1);
        }
예제 #2
0
        public void TestGetMostRecentMarginalCarbonEmissionsResult()
        {
            // Arrange
            var regionAbbreviation = "PJM";
            EmissionsApiInteraction emissionsApiInteraction = new EmissionsApiInteraction(selfThrottlingMethod, maxNumberOfCallsPerMinute);

            emissionsApiInteraction.RegisterWithWattTime(this.wattTimeApiV2Url, WattTimeUsername, WattTimePassword, WattTimeEmail, WattTimeOrganization);

            // Act
            var pointsReturned = emissionsApiInteraction.GetMostRecentMarginalCarbonEmissionsResult(this.wattTimeApiV2Url, regionAbbreviation, WattTimeUsername, WattTimePassword);

            // Assert
            Assert.IsTrue(pointsReturned.value > -1);
        }