コード例 #1
0
        public void TestGetAll()
        {
            // Arrange
            EmissionsController emissionsController = new EmissionsController();

            // Act
            var result = emissionsController.Get();

            // Assert
            Assert.IsTrue(result.Any());
        }
コード例 #2
0
        public void TestGetById()
        {
            // Arrange
            EmissionsController emissionsController = new EmissionsController();
            var region = "US_PJM";

            // Act
            var result        = emissionsController.Get(region);
            var resultContent = (result as OkNegotiatedContentResult <List <GridEmissionsDataPoint> >).Content;

            // Assert
            Assert.IsTrue(resultContent.Any());
        }