Example #1
0
        public void Parameter_Condition_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    Condition = Enums.WeatherCondition.MostlyCloudy
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["cd"], Is.EqualTo("Mostly Cloudy"));
        }
Example #2
0
        public void Parameter_PeakPower_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    PeakPower = 3700
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["pp"], Is.EqualTo(3700));
        }
Example #3
0
        public void Parameter_PeakTime_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    PeakTime = new TimeSpan(10, 30, 12)
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["pt"], Is.EqualTo("10:30"));
        }
Example #4
0
        public void Parameter_Consumption_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    Consumption = 9876
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["c"], Is.EqualTo(9876));
        }
Example #5
0
        public void Parameter_EnergyExported_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    EnergyExported = 2500
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["e"], Is.EqualTo(2500));
        }
Example #6
0
        public void Parameter_HighShoulderEnergyImport_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    HighShoulderEnergyImport = 226
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["ih"], Is.EqualTo("226"));
        }
Example #7
0
        public void Parameter_Date_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    OutputDate = new DateTime(2020, 3, 1)
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["d"], Is.EqualTo("20200301"));
        }
Example #8
0
        public void Parameter_OffPeakEnergyImport_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    OffPeakEnergyImport = 224
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["io"], Is.EqualTo("224"));
        }
Example #9
0
        public void Parameter_Comments_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    Comments = "Comment"
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["cm"], Is.EqualTo("Comment"));
        }
Example #10
0
        public void Parameter_MaximumTemperature_CreatesCorrectUriParameters()
        {
            var request = new AddOutputRequest()
            {
                Output = new OutputPost()
                {
                    MaximumTemperature = 18.2m
                }
            };

            var parameters = request.GetUriPathParameters();

            Assert.That(parameters["tx"], Is.EqualTo("18.2"));
        }