diff --git a/bundles/org.openhab.core.thing/pom.xml b/bundles/org.openhab.core.thing/pom.xml index 4f8617190..718b2bf95 100644 --- a/bundles/org.openhab.core.thing/pom.xml +++ b/bundles/org.openhab.core.thing/pom.xml @@ -24,6 +24,12 @@ org.openhab.core.io.console ${project.version} + + org.openhab.core.bundles + org.openhab.core.test + ${project.version} + test + diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ChannelGroupUIDTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ChannelGroupUIDTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ChannelGroupUIDTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ChannelGroupUIDTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ChannelTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ChannelTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ChannelTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ChannelTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ChannelUIDTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ChannelUIDTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ChannelUIDTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ChannelUIDTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ThingUIDTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ThingUIDTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/ThingUIDTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/ThingUIDTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/UIDTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/UIDTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/UIDTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/UIDTest.java diff --git a/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/binding/builder/ThingStatusInfoBuilderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/binding/builder/ThingStatusInfoBuilderTest.java index b749135b4..ff77fb9d6 100644 --- a/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/binding/builder/ThingStatusInfoBuilderTest.java +++ b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/binding/builder/ThingStatusInfoBuilderTest.java @@ -37,40 +37,40 @@ public class ThingStatusInfoBuilderTest { @Test public void testThingStatusInfoBuilderStatus() { - ThingStatusInfo thigStatusInfo = builder.build(); + ThingStatusInfo thingStatusInfo = builder.build(); - assertThat(thigStatusInfo.getStatus(), is(ThingStatus.ONLINE)); - assertThat(thigStatusInfo.getStatusDetail(), is(ThingStatusDetail.NONE)); - assertThat(thigStatusInfo.getDescription(), is(nullValue())); + assertThat(thingStatusInfo.getStatus(), is(ThingStatus.ONLINE)); + assertThat(thingStatusInfo.getStatusDetail(), is(ThingStatusDetail.NONE)); + assertThat(thingStatusInfo.getDescription(), is(nullValue())); } @Test public void testThingStatusInfoBuilderStatusDetails() { - ThingStatusInfo thigStatusInfo = builder.withStatusDetail(ThingStatusDetail.DISABLED).build(); + ThingStatusInfo thingStatusInfo = builder.withStatusDetail(ThingStatusDetail.DISABLED).build(); - assertThat(thigStatusInfo.getStatus(), is(ThingStatus.ONLINE)); - assertThat(thigStatusInfo.getStatusDetail(), is(ThingStatusDetail.DISABLED)); - assertThat(thigStatusInfo.getDescription(), is(nullValue())); + assertThat(thingStatusInfo.getStatus(), is(ThingStatus.ONLINE)); + assertThat(thingStatusInfo.getStatusDetail(), is(ThingStatusDetail.DISABLED)); + assertThat(thingStatusInfo.getDescription(), is(nullValue())); } @Test public void testThingStatusInfoBuilderStatusDescription() { - ThingStatusInfo thigStatusInfo = builder.withDescription("My test description").build(); + ThingStatusInfo thingStatusInfo = builder.withDescription("My test description").build(); - assertThat(thigStatusInfo.getStatus(), is(ThingStatus.ONLINE)); - assertThat(thigStatusInfo.getStatusDetail(), is(ThingStatusDetail.NONE)); - assertThat(thigStatusInfo.getDescription(), is("My test description")); + assertThat(thingStatusInfo.getStatus(), is(ThingStatus.ONLINE)); + assertThat(thingStatusInfo.getStatusDetail(), is(ThingStatusDetail.NONE)); + assertThat(thingStatusInfo.getDescription(), is("My test description")); } @Test public void subsequentBuildsCreateIndependentThingStatusInfos() { - ThingStatusInfo thigStatusInfo1 = builder.build(); - ThingStatusInfo thigStatusInfo2 = builder.withStatusDetail(ThingStatusDetail.DISABLED) + ThingStatusInfo thingStatusInfo1 = builder.build(); + ThingStatusInfo thingStatusInfo2 = builder.withStatusDetail(ThingStatusDetail.DISABLED) .withDescription("My test description").build(); - assertThat(thigStatusInfo2.getStatus(), is(thigStatusInfo1.getStatus())); - assertThat(thigStatusInfo2.getStatusDetail(), is(not(thigStatusInfo1.getStatusDetail()))); - assertThat(thigStatusInfo2.getDescription(), is(not(thigStatusInfo1.getDescription()))); + assertThat(thingStatusInfo2.getStatus(), is(thingStatusInfo1.getStatus())); + assertThat(thingStatusInfo2.getStatusDetail(), is(not(thingStatusInfo1.getStatusDetail()))); + assertThat(thingStatusInfo2.getDescription(), is(not(thingStatusInfo1.getDescription()))); } } diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/firmware/FirmwareEventFactoryTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/firmware/FirmwareEventFactoryTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/firmware/FirmwareEventFactoryTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/firmware/FirmwareEventFactoryTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/AutoUpdateManagerTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/AutoUpdateManagerTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/AutoUpdateManagerTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/AutoUpdateManagerTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/ChannelItemProviderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/ChannelItemProviderTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/ChannelItemProviderTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/ChannelItemProviderTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/ThingManagerTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/ThingManagerTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/ThingManagerTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/ThingManagerTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/firmware/ProgressCallbackTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/firmware/ProgressCallbackTest.java similarity index 98% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/firmware/ProgressCallbackTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/firmware/ProgressCallbackTest.java index e58181f99..be0ae0d01 100644 --- a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/firmware/ProgressCallbackTest.java +++ b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/firmware/ProgressCallbackTest.java @@ -12,7 +12,6 @@ */ package org.eclipse.smarthome.core.thing.internal.firmware; -import static org.eclipse.smarthome.core.thing.firmware.Constants.*; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.assertThat; import static org.mockito.ArgumentMatchers.any; @@ -52,6 +51,11 @@ import org.osgi.framework.Bundle; */ public final class ProgressCallbackTest { + private static final String BINDING_ID = "simpleBinding"; + private static final String THING_TYPE_ID1 = "simpleThingType1"; + private static final ThingTypeUID THING_TYPE_UID1 = new ThingTypeUID(BINDING_ID, THING_TYPE_ID1); + private static final String THING1_ID = "simpleThing1"; + private ProgressCallbackImpl sut; private List postedEvents; private ThingUID expectedThingUID; diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/RawButtonToggleSwitchProfileTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/RawButtonToggleSwitchProfileTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/RawButtonToggleSwitchProfileTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/RawButtonToggleSwitchProfileTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemDefaultProfileTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemDefaultProfileTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemDefaultProfileTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemDefaultProfileTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemFollowProfileTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemFollowProfileTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemFollowProfileTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemFollowProfileTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemOffsetProfileTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemOffsetProfileTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemOffsetProfileTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/SystemOffsetProfileTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/TimestampProfileTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/TimestampProfileTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/internal/profiles/TimestampProfileTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/internal/profiles/TimestampProfileTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/type/ChannelGroupTypeBuilderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/type/ChannelGroupTypeBuilderTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/type/ChannelGroupTypeBuilderTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/type/ChannelGroupTypeBuilderTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/type/ChannelTypeBuilderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/type/ChannelTypeBuilderTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/type/ChannelTypeBuilderTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/type/ChannelTypeBuilderTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/type/ThingTypeBuilderTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/type/ThingTypeBuilderTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/type/ThingTypeBuilderTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/type/ThingTypeBuilderTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/util/ThingHandlerHelperTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/util/ThingHandlerHelperTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/util/ThingHandlerHelperTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/util/ThingHandlerHelperTest.java diff --git a/itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/util/ThingHelperTest.java b/bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/util/ThingHelperTest.java similarity index 100% rename from itests/org.openhab.core.thing.tests/src/main/java/org/eclipse/smarthome/core/thing/util/ThingHelperTest.java rename to bundles/org.openhab.core.thing/src/test/java/org/eclipse/smarthome/core/thing/util/ThingHelperTest.java