diff --git a/pom.xml b/pom.xml index 18eb19cc..ce272243 100644 --- a/pom.xml +++ b/pom.xml @@ -6,10 +6,11 @@ org.openhab.addons.bundles org.openhab.addons.reactor.bundles - 4.0.0-SNAPSHOT + 4.2.0 org.openhab.automation.jrule openHAB Add-ons :: Bundles :: Standalone Java Rules Automation + 4.2.1-SNAPSHOT com.sun.org.apache.xml.internal.utils.*;resolution:=optional,\ @@ -92,10 +93,16 @@ test - com.github.tomakehurst - wiremock-jre8 - 2.35.0 + org.wiremock + wiremock + 3.8.0 test + + + org.slf4j + slf4j-api + + org.mockito diff --git a/src/main/history/dependencies.xml b/src/main/history/dependencies.xml index a4b3ea6c..b169ca58 100644 --- a/src/main/history/dependencies.xml +++ b/src/main/history/dependencies.xml @@ -1,11 +1,11 @@ - + openhab-runtime-base wrap mvn:javax.el/javax.el-api/2.2.4 mvn:org.freemarker/freemarker/2.3.32 - mvn:org.openhab.addons.bundles/org.openhab.automation.jrule/4.0.0-SNAPSHOT + mvn:org.openhab.addons.bundles/org.openhab.automation.jrule/4.2.0 wrap:mvn:javax.servlet/jsp-api/2.0 wrap:mvn:javax.servlet/servlet-api/2.4 wrap:mvn:org.lastnpe.eea/eea-all/2.2.1 diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalContactItem.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalContactItem.java index fab40a96..3d1f03b5 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalContactItem.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalContactItem.java @@ -44,20 +44,21 @@ public Optional minimumSince(ZonedDateTime timestamp, String persistence public Optional varianceSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.varianceSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional deviationSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.deviationSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional averageSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.averageSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional sumSince(ZonedDateTime timestamp, String persistenceServiceId) { - return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId).map(DecimalType::doubleValue); + return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId) + .map(state -> getNumericValue(state)); } } diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalItem.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalItem.java index e6b7ab3b..04490557 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalItem.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalItem.java @@ -24,6 +24,8 @@ import org.openhab.automation.jrule.items.metadata.JRuleMetadataRegistry; import org.openhab.automation.jrule.rules.value.JRuleStringValue; import org.openhab.automation.jrule.rules.value.JRuleValue; +import org.openhab.core.library.types.DecimalType; +import org.openhab.core.library.types.QuantityType; import org.openhab.core.types.State; /** @@ -139,6 +141,16 @@ public boolean equals(Object o) { && id.equals(that.id); } + protected Double getNumericValue(State state) { + if (state instanceof DecimalType) { + return ((DecimalType) state).doubleValue(); + } else if (state instanceof QuantityType) { + return ((QuantityType) state).doubleValue(); + } else { + return null; + } + } + @Override public int hashCode() { return Objects.hash(name, label, type, id); diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalNumberItem.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalNumberItem.java index 045cc837..524764b1 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalNumberItem.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalNumberItem.java @@ -44,20 +44,21 @@ public Optional minimumSince(ZonedDateTime timestamp, String persistence public Optional varianceSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.varianceSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional deviationSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.deviationSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional averageSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.averageSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional sumSince(ZonedDateTime timestamp, String persistenceServiceId) { - return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId).map(DecimalType::doubleValue); + return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId) + .map(state -> getNumericValue(state)); } } diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalQuantityItem.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalQuantityItem.java index 520aafb9..c539596a 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalQuantityItem.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalQuantityItem.java @@ -44,20 +44,21 @@ public Optional minimumSince(ZonedDateTime timestamp, String persistence public Optional varianceSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.varianceSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional deviationSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.deviationSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional averageSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.averageSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional sumSince(ZonedDateTime timestamp, String persistenceServiceId) { - return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId).map(DecimalType::doubleValue); + return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId) + .map(state -> getNumericValue(state)); } } diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalRollershutterItem.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalRollershutterItem.java index b106b706..88132d79 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalRollershutterItem.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalRollershutterItem.java @@ -44,20 +44,21 @@ public Optional minimumSince(ZonedDateTime timestamp, String persistence public Optional varianceSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.varianceSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional deviationSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.deviationSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional averageSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.averageSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional sumSince(ZonedDateTime timestamp, String persistenceServiceId) { - return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId).map(DecimalType::doubleValue); + return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId) + .map(state -> getNumericValue(state)); } } diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalSwitchItem.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalSwitchItem.java index d33456f3..567a1abf 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalSwitchItem.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRuleInternalSwitchItem.java @@ -43,20 +43,21 @@ public Optional minimumSince(ZonedDateTime timestamp, String persistence public Optional varianceSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.varianceSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional deviationSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.deviationSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional averageSince(ZonedDateTime timestamp, String persistenceServiceId) { return JRulePersistenceExtensions.averageSince(name, timestamp, persistenceServiceId) - .map(DecimalType::doubleValue); + .map(state -> getNumericValue(state)); } public Optional sumSince(ZonedDateTime timestamp, String persistenceServiceId) { - return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId).map(DecimalType::doubleValue); + return JRulePersistenceExtensions.sumSince(name, timestamp, persistenceServiceId) + .map(state -> getNumericValue(state)); } } diff --git a/src/main/java/org/openhab/automation/jrule/internal/items/JRulePersistenceExtensions.java b/src/main/java/org/openhab/automation/jrule/internal/items/JRulePersistenceExtensions.java index 93b37b62..5548da6b 100644 --- a/src/main/java/org/openhab/automation/jrule/internal/items/JRulePersistenceExtensions.java +++ b/src/main/java/org/openhab/automation/jrule/internal/items/JRulePersistenceExtensions.java @@ -24,12 +24,7 @@ import org.openhab.core.items.ItemNotFoundException; import org.openhab.core.items.ItemRegistry; import org.openhab.core.library.types.DecimalType; -import org.openhab.core.persistence.FilterCriteria; -import org.openhab.core.persistence.HistoricItem; -import org.openhab.core.persistence.ModifiablePersistenceService; -import org.openhab.core.persistence.PersistenceService; -import org.openhab.core.persistence.PersistenceServiceRegistry; -import org.openhab.core.persistence.QueryablePersistenceService; +import org.openhab.core.persistence.*; import org.openhab.core.persistence.extensions.PersistenceExtensions; import org.openhab.core.types.State; @@ -138,45 +133,50 @@ public static Optional minimumSince(String itemName, ZonedDateTime .map(historicItem -> historicItem.getState().as(DecimalType.class)); } - public static Optional varianceSince(String itemName, ZonedDateTime timestamp) + public static Optional varianceSince(String itemName, ZonedDateTime timestamp) throws JRuleItemNotFoundException { return varianceSince(itemName, timestamp, null); } - public static Optional varianceSince(String itemName, ZonedDateTime timestamp, String serviceId) { + public static Optional varianceSince(String itemName, ZonedDateTime timestamp, String serviceId) { Item item = getItem(itemName); return Optional.ofNullable(serviceId == null ? PersistenceExtensions.varianceSince(item, timestamp) : PersistenceExtensions.varianceSince(item, timestamp, serviceId)); } - public static Optional deviationSince(String itemName, ZonedDateTime timestamp) { + public static Optional deviationSince(String itemName, ZonedDateTime timestamp) { return deviationSince(itemName, timestamp, null); } - public static Optional deviationSince(String itemName, ZonedDateTime timestamp, String serviceId) { + public static Optional deviationSince(String itemName, ZonedDateTime timestamp, String serviceId) { Item item = getItem(itemName); return Optional.ofNullable(serviceId == null ? PersistenceExtensions.deviationSince(item, timestamp) : PersistenceExtensions.deviationSince(item, timestamp, serviceId)); } - public static Optional averageSince(String itemName, ZonedDateTime timestamp) { + public static Optional averageSince(String itemName, ZonedDateTime timestamp) { return averageSince(itemName, timestamp, null); } - public static Optional averageSince(String itemName, ZonedDateTime timestamp, String serviceId) { + public static Optional averageSince(String itemName, ZonedDateTime timestamp, String serviceId) { Item item = getItem(itemName); return Optional.ofNullable(serviceId == null ? PersistenceExtensions.averageSince(item, timestamp) : PersistenceExtensions.averageSince(item, timestamp, serviceId)); } - public static Optional sumSince(String itemName, ZonedDateTime timestamp) { + public static Optional sumSince(String itemName, ZonedDateTime timestamp) { return sumSince(itemName, timestamp, null); } - public static Optional sumSince(String itemName, ZonedDateTime timestamp, String serviceId) { + public static Optional sumSince(String itemName, ZonedDateTime timestamp, String serviceId) { Item item = getItem(itemName); - return Optional.of(serviceId == null ? PersistenceExtensions.sumSince(item, timestamp) - : PersistenceExtensions.sumSince(item, timestamp, serviceId)); + State state; + if (serviceId == null) { + state = PersistenceExtensions.sumSince(item, timestamp); + } else { + state = PersistenceExtensions.sumSince(item, timestamp, serviceId); + } + return state != null ? Optional.of(state) : Optional.empty(); } public static Optional lastUpdate(String itemName) { @@ -185,8 +185,13 @@ public static Optional lastUpdate(String itemName) { public static Optional lastUpdate(String itemName, String serviceId) { Item item = getItem(itemName); - return Optional.ofNullable(serviceId == null ? PersistenceExtensions.lastUpdate(item) - : PersistenceExtensions.lastUpdate(item, serviceId)); + ZonedDateTime state; + if (serviceId == null) { + state = PersistenceExtensions.lastUpdate(item); + } else { + state = PersistenceExtensions.lastUpdate(item, serviceId); + } + return state != null ? Optional.of(state) : Optional.empty(); } public static Optional previousState(String itemName, boolean skipEquals) { diff --git a/src/main/java/org/openhab/automation/jrule/items/JRuleItemClassGenerator.java b/src/main/java/org/openhab/automation/jrule/items/JRuleItemClassGenerator.java index c944d9ad..f479be69 100644 --- a/src/main/java/org/openhab/automation/jrule/items/JRuleItemClassGenerator.java +++ b/src/main/java/org/openhab/automation/jrule/items/JRuleItemClassGenerator.java @@ -14,11 +14,7 @@ import java.io.File; import java.io.FileWriter; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; @@ -93,7 +89,7 @@ private Map createItemModel(Item item, Map e.getKey() + ": " + e.getValue()) .collect(Collectors.joining(", "))); - itemModel.put("tags", StringUtils.join(item.getTags(), ", ")); + itemModel.put("tags", StringUtils.join(item.getTags().stream().sorted().toList(), ", ")); // Group handling if (item.getType().equals(GroupItem.TYPE)) { diff --git a/src/main/java/org/openhab/automation/jrule/items/JRuleItemNameClassGenerator.java b/src/main/java/org/openhab/automation/jrule/items/JRuleItemNameClassGenerator.java index 46347b17..dfd8dfc8 100644 --- a/src/main/java/org/openhab/automation/jrule/items/JRuleItemNameClassGenerator.java +++ b/src/main/java/org/openhab/automation/jrule/items/JRuleItemNameClassGenerator.java @@ -14,11 +14,7 @@ import java.io.File; import java.io.FileWriter; -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; @@ -87,7 +83,7 @@ private Map createItemModel(Item item, Map e.getKey() + ": " + e.getValue()) .collect(Collectors.joining(", "))); - itemModel.put("tags", StringUtils.join(item.getTags(), ", ")); + itemModel.put("tags", StringUtils.join(item.getTags().stream().sorted().toList(), ", ")); return itemModel; } } diff --git a/src/main/java/org/openhab/automation/jrule/items/JRuleItemRegistry.java b/src/main/java/org/openhab/automation/jrule/items/JRuleItemRegistry.java index 026b569a..549314d5 100644 --- a/src/main/java/org/openhab/automation/jrule/items/JRuleItemRegistry.java +++ b/src/main/java/org/openhab/automation/jrule/items/JRuleItemRegistry.java @@ -13,7 +13,6 @@ package org.openhab.automation.jrule.items; import java.lang.reflect.Constructor; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -21,40 +20,10 @@ import org.openhab.automation.jrule.exception.JRuleItemNotFoundException; import org.openhab.automation.jrule.internal.handler.JRuleEventHandler; -import org.openhab.automation.jrule.internal.items.JRuleInternalCallGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalCallItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalColorGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalColorItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalContactGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalContactItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalDateTimeGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalDateTimeItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalDimmerGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalDimmerItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalImageGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalImageItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalLocationGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalLocationItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalNumberGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalNumberItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalPlayerGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalPlayerItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalQuantityGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalQuantityItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalRollershutterGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalRollershutterItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalStringGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalStringItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalSwitchGroupItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalSwitchItem; -import org.openhab.automation.jrule.internal.items.JRuleInternalUnspecifiedGroupItem; +import org.openhab.automation.jrule.internal.items.*; import org.openhab.automation.jrule.items.metadata.JRuleMetadataRegistry; import org.openhab.automation.jrule.rules.value.JRuleValue; -import org.openhab.core.items.GroupItem; -import org.openhab.core.items.Item; -import org.openhab.core.items.ItemNotFoundException; -import org.openhab.core.items.ItemRegistry; -import org.openhab.core.items.MetadataRegistry; +import org.openhab.core.items.*; import org.openhab.core.library.CoreItemFactory; /** @@ -128,7 +97,7 @@ public static JRuleItem get(String itemName) throws JRule String.class, String.class, String.class, JRuleMetadataRegistry.class, List.class); constructor.setAccessible(true); jRuleItem = constructor.newInstance(itemName, item.getLabel(), item.getType(), item.getUID(), - new JRuleMetadataRegistry(metadataRegistry), new ArrayList<>(item.getTags())); + new JRuleMetadataRegistry(metadataRegistry), item.getTags().stream().sorted().toList()); itemRegistry.put(itemName, jRuleItem); } catch (Exception ex) { throw new RuntimeException(ex); @@ -147,7 +116,7 @@ public static T get(String itemName, Class jRuleItemCla Constructor constructor = jRuleItemClass.getDeclaredConstructor(String.class, String.class, String.class, String.class, JRuleMetadataRegistry.class, List.class); jruleItem = constructor.newInstance(item.getName(), item.getLabel(), item.getType(), item.getUID(), - new JRuleMetadataRegistry(metadataRegistry), new ArrayList<>(item.getTags())); + new JRuleMetadataRegistry(metadataRegistry), item.getTags().stream().sorted().toList()); itemRegistry.put(itemName, jruleItem); } catch (Exception ex) { throw new RuntimeException(String.format("cannot create item '%s' for type '%s'", itemName, diff --git a/src/test/java/org/openhab/automation/jrule/rules/integration_test/JRuleITBase.java b/src/test/java/org/openhab/automation/jrule/rules/integration_test/JRuleITBase.java index 9160c5f6..5d083903 100644 --- a/src/test/java/org/openhab/automation/jrule/rules/integration_test/JRuleITBase.java +++ b/src/test/java/org/openhab/automation/jrule/rules/integration_test/JRuleITBase.java @@ -30,11 +30,7 @@ import java.util.stream.Stream; import org.awaitility.Awaitility; -import org.eclipse.paho.client.mqttv3.IMqttClient; -import org.eclipse.paho.client.mqttv3.MqttClient; -import org.eclipse.paho.client.mqttv3.MqttConnectOptions; -import org.eclipse.paho.client.mqttv3.MqttException; -import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.eclipse.paho.client.mqttv3.*; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.*; import org.openhab.automation.jrule.items.JRuleSwitchItem; @@ -113,7 +109,7 @@ public abstract class JRuleITBase { public static final int TIMEOUT = 180; public static final String LOG_REGEX_START = "^\\d+:\\d+:\\d+.\\d+.*"; @SuppressWarnings("resource") - private static final GenericContainer openhabContainer = new GenericContainer<>("openhab/openhab:4.0.0-debian") + private static final GenericContainer openhabContainer = new GenericContainer<>("openhab/openhab:4.2.0-debian") .withCopyToContainer(MountableFile.forClasspathResource("docker/conf", 0777), "/openhab/conf") .withCopyFileToContainer(MountableFile.forClasspathResource("docker/log4j2.xml", 0777), "/openhab/userdata/etc/log4j2.xml") @@ -170,7 +166,7 @@ protected void waitUntilReady() { }).withStartupTimeout(Duration.of(TIMEOUT, ChronoUnit.SECONDS))) .withNetwork(network).dependsOn(influxDbContainer).withReuse(true); - protected static final GenericContainer mockServer = new GenericContainer<>("wiremock/wiremock:2.32.0") + protected static final GenericContainer mockServer = new GenericContainer<>("wiremock/wiremock:3.8.0") .withExposedPorts(8080).withNetwork(network).withNetworkAliases("http-mock"); protected static ToxiproxyContainer.ContainerProxy mqttProxy; diff --git a/src/test/java/org/openhab/automation/jrule/rules/user/TestRules.java b/src/test/java/org/openhab/automation/jrule/rules/user/TestRules.java index e71ec008..49353090 100755 --- a/src/test/java/org/openhab/automation/jrule/rules/user/TestRules.java +++ b/src/test/java/org/openhab/automation/jrule/rules/user/TestRules.java @@ -29,33 +29,8 @@ import org.openhab.automation.jrule.exception.JRuleExecutionException; import org.openhab.automation.jrule.items.*; -import org.openhab.automation.jrule.items.JRuleColorItem; -import org.openhab.automation.jrule.items.JRuleContactItem; -import org.openhab.automation.jrule.items.JRuleDateTimeItem; -import org.openhab.automation.jrule.items.JRuleDimmerItem; -import org.openhab.automation.jrule.items.JRuleImageItem; -import org.openhab.automation.jrule.items.JRuleItem; -import org.openhab.automation.jrule.items.JRuleLocationItem; -import org.openhab.automation.jrule.items.JRuleNumberGroupItem; -import org.openhab.automation.jrule.items.JRuleNumberItem; -import org.openhab.automation.jrule.items.JRulePlayerItem; -import org.openhab.automation.jrule.items.JRuleRollershutterItem; -import org.openhab.automation.jrule.items.JRuleStringItem; -import org.openhab.automation.jrule.items.JRuleSwitchGroupItem; -import org.openhab.automation.jrule.items.JRuleSwitchItem; import org.openhab.automation.jrule.items.metadata.JRuleItemMetadata; import org.openhab.automation.jrule.rules.*; -import org.openhab.automation.jrule.rules.JRule; -import org.openhab.automation.jrule.rules.JRuleCondition; -import org.openhab.automation.jrule.rules.JRuleMemberOf; -import org.openhab.automation.jrule.rules.JRuleName; -import org.openhab.automation.jrule.rules.JRulePrecondition; -import org.openhab.automation.jrule.rules.JRuleWhenChannelTrigger; -import org.openhab.automation.jrule.rules.JRuleWhenCronTrigger; -import org.openhab.automation.jrule.rules.JRuleWhenItemChange; -import org.openhab.automation.jrule.rules.JRuleWhenItemReceivedCommand; -import org.openhab.automation.jrule.rules.JRuleWhenItemReceivedUpdate; -import org.openhab.automation.jrule.rules.JRuleWhenThingTrigger; import org.openhab.automation.jrule.rules.event.JRuleChannelEvent; import org.openhab.automation.jrule.rules.event.JRuleItemEvent; import org.openhab.automation.jrule.rules.event.JRuleThingEvent;