[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

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