Esempio n. 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"));
        }
Esempio n. 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));
        }
Esempio n. 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"));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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"));
        }
Esempio n. 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"));
        }
Esempio n. 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"));
        }
Esempio n. 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"));
        }
Esempio n. 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"));
        }