[mielecloud] Remove things after each integration test (#13875)

Signed-off-by: Björn Lange <bjoern.lange@itemis.de>
This commit is contained in:
Björn Lange
2022-12-10 09:40:50 +01:00
committed by GitHub
parent 8e31d8f0ca
commit 92310fab2f

View File

@@ -27,6 +27,7 @@ import java.util.Optional;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable; import org.eclipse.jdt.annotation.Nullable;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.openhab.binding.mielecloud.internal.MieleCloudBindingConstants; import org.openhab.binding.mielecloud.internal.MieleCloudBindingConstants;
@@ -366,6 +367,12 @@ public abstract class AbstractMieleThingHandlerTest extends JavaOSGiTest {
*/ */
protected abstract AbstractMieleThingHandler setUpThingHandler(); protected abstract AbstractMieleThingHandler setUpThingHandler();
@AfterEach
public void tearDownAbstractMieleThingHandlerTest() {
getThingRegistry().forceRemove(getThingHandler().getThing().getUID());
getThingRegistry().forceRemove(getBridge().getUID());
}
@Test @Test
public void testCachedStateIsQueriedOnInitialize() throws Exception { public void testCachedStateIsQueriedOnInitialize() throws Exception {
// given: // given: