mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[awattar] fix more naming and remove outdated variable
Signed-off-by: Thomas Leber <thomas@tl-photography.at>
This commit is contained in:
parent
2cc529b143
commit
70a9c79e6e
@ -32,7 +32,6 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult {
|
||||
private final List<AwattarPrice> members;
|
||||
private final ZoneId zoneId;
|
||||
private boolean sorted = true;
|
||||
|
||||
public AwattarNonConsecutiveBestPriceResult(List<AwattarPrice> prices, int length, boolean inverted,
|
||||
ZoneId zoneId) {
|
||||
@ -57,7 +56,6 @@ public class AwattarNonConsecutiveBestPriceResult extends AwattarBestPriceResult
|
||||
}
|
||||
|
||||
private void addMember(AwattarPrice member) {
|
||||
sorted = false;
|
||||
members.add(member);
|
||||
updateStart(member.timerange().start());
|
||||
updateEnd(member.timerange().end());
|
||||
|
@ -25,6 +25,7 @@ import java.util.List;
|
||||
import java.util.SortedSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.openhab.binding.awattar.internal.handler.TimeRange;
|
||||
|
||||
@ -34,6 +35,7 @@ import org.openhab.binding.awattar.internal.handler.TimeRange;
|
||||
*
|
||||
* @author Thomas Leber - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class AwattarBestPriceTest {
|
||||
|
||||
private ZoneId zoneId = ZoneId.of("GMT");
|
||||
@ -86,7 +88,7 @@ public class AwattarBestPriceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void AwattarNonConsecutiveBestPriceResult_nonInverted() {
|
||||
void AwattarNonConsecutiveBestPriceResultNonInverted() {
|
||||
int length = 6;
|
||||
boolean inverted = false;
|
||||
|
||||
@ -99,7 +101,7 @@ public class AwattarBestPriceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void AwattarNonConsecutiveBestPriceResult_inverted() {
|
||||
void AwattarNonConsecutiveBestPriceResultInverted() {
|
||||
int length = 4;
|
||||
boolean inverted = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user