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