[influxdb] Fix faling tests after core changes (#14965)

Related to openhab/openhab-core#3600

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2023-05-10 17:59:54 +02:00 committed by GitHub
parent 4a2c3a35ba
commit bca5711d8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import org.openhab.core.i18n.UnitProvider;
import org.openhab.core.items.ItemRegistry; import org.openhab.core.items.ItemRegistry;
import org.openhab.core.items.Metadata; import org.openhab.core.items.Metadata;
import org.openhab.core.items.MetadataKey; import org.openhab.core.items.MetadataKey;
@ -59,6 +60,7 @@ public class ItemToStorePointCreatorTest {
DATABASE_PARAM, "openhab", // DATABASE_PARAM, "openhab", //
RETENTION_POLICY_PARAM, "default"); RETENTION_POLICY_PARAM, "default");
private @Mock UnitProvider unitProviderMock;
private @Mock ItemRegistry itemRegistryMock; private @Mock ItemRegistry itemRegistryMock;
private @Mock MetadataRegistry metadataRegistry; private @Mock MetadataRegistry metadataRegistry;
private InfluxDBPersistenceService instance; private InfluxDBPersistenceService instance;
@ -254,7 +256,7 @@ public class ItemToStorePointCreatorTest {
InfluxDBPersistenceService instance = new InfluxDBPersistenceService(itemRegistryMock, influxDBMetadataService, InfluxDBPersistenceService instance = new InfluxDBPersistenceService(itemRegistryMock, influxDBMetadataService,
configuration); configuration);
instance.setItemFactory(new CoreItemFactory()); instance.setItemFactory(new CoreItemFactory(unitProviderMock));
return instance; return instance;
} }