Skip to content
Snippets Groups Projects
Commit 8ea50097 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Renaming method

parent d9f47e5f
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ import java.util.TimeZone;
*/
public class SolarRadiationUtil {
public Double getSolarRadiationAtLocationAndTime(Double latitude, Double longitude, Date date, TimeZone timeZone)
public Double calculateSolarRadiationAtLocationAndTime(Double latitude, Double longitude, Date date, TimeZone timeZone)
{
// We must adjust the hour to reflect the deviation from the LSTM (Local Standard Time Meridian)
Calendar cal = Calendar.getInstance(timeZone);
......
......@@ -145,9 +145,9 @@ public class SolarRadiationUtilTest extends TestCase {
}
/**
* Test of getSolarRadiationAtLocationAndTime method, of class SolarRadiationUtil.
* Test of calculateSolarRadiationAtLocationAndTime method, of class SolarRadiationUtil.
*/
public void testGetSolarRadiationAtLocationAndTime() {
public void testCalculateSolarRadiationAtLocationAndTime() {
System.out.println("getSolarRadiationAtLocationAndTime");
Double latitude = 59.660468;
Double longitude = 10.781989;
......@@ -157,7 +157,7 @@ public class SolarRadiationUtilTest extends TestCase {
Date date = cal.getTime();
SolarRadiationUtil instance = new SolarRadiationUtil();
Double expResult = 0.9540516211907254;
Double result = instance.getSolarRadiationAtLocationAndTime(latitude, longitude, date, timeZone);
Double result = instance.calculateSolarRadiationAtLocationAndTime(latitude, longitude, date, timeZone);
assertEquals(expResult, result);
/*
......@@ -169,7 +169,7 @@ public class SolarRadiationUtilTest extends TestCase {
format.setTimeZone(timeZone);
while(cal.get(Calendar.DAY_OF_YEAR) <= lastDayOfYear)
{
String resultStr = String.valueOf(instance.getSolarRadiationAtLocationAndTime(latitude, longitude, date, timeZone) * 1000);
String resultStr = String.valueOf(instance.calculateSolarRadiationAtLocationAndTime(latitude, longitude, date, timeZone) * 1000);
System.out.println(format.format(date) + ";" + resultStr.replace(".", ","));
cal.add(Calendar.HOUR_OF_DAY, 1);
date = cal.getTime();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment