Skip to content

Commit

Permalink
DCO Remediation Commit for Margaret <[email protected]>
Browse files Browse the repository at this point in the history
I, Margaret <[email protected]>, hereby add my Signed-off-by to this commit: 37803b6

Signed-off-by: Margaret <[email protected]>
  • Loading branch information
in4margaret committed Mar 21, 2023
1 parent e8f8665 commit 4d4ede3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public async Task GetCurrentCarbonIntensityForecastAsync_ByLocation()
{
var mockDataSource = SetupMockDataSource();

var location = new Location { Name = "westus" };
var location = new Location { Name = "westus" };

var dataSource = mockDataSource.Object;
var result = await dataSource.GetCurrentCarbonIntensityForecastAsync(location);
Expand All @@ -116,7 +116,7 @@ public async Task GetCarbonIntensityAsync_ReturnsEmptyEmissionData()
var logger = Mock.Of<ILogger<JsonDataSource>>();
var monitor = Mock.Of<IOptionsMonitor<JsonDataSourceConfiguration>>();
var mockDataSource = new Mock<JsonDataSource>(logger, monitor);

mockDataSource.Protected()
.Setup<Task<List<EmissionsData>?>>("GetJsonDataAsync")
.ReturnsAsync(new List<EmissionsData>())
Expand All @@ -132,7 +132,8 @@ public async Task GetCarbonIntensityAsync_ReturnsEmptyEmissionData()
Assert.That(!result.Any(), Is.True);
}

private Mock<JsonDataSource> SetupMockDataSource() {
private Mock<JsonDataSource> SetupMockDataSource()
{
var logger = Mock.Of<ILogger<JsonDataSource>>();
var monitor = Mock.Of<IOptionsMonitor<JsonDataSourceConfiguration>>();
var mockDataSource = new Mock<JsonDataSource>(logger, monitor);
Expand Down

0 comments on commit 4d4ede3

Please sign in to comment.