[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

View File

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