mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 11:45:49 +01:00
Reduce Mockito warnings (#2893)
Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
7442220830
commit
2a3e2e5567
@ -59,7 +59,7 @@ import org.osgi.service.cm.ConfigurationAdmin;
|
||||
* @author Jan N. Klug - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class AbstractRemoteAddonServiceTest {
|
||||
private @Mock @NonNullByDefault({}) StorageService storageService;
|
||||
|
@ -38,7 +38,7 @@ import org.mockito.quality.Strictness;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
public class BundleVersionTest {
|
||||
|
||||
private static Stream<Arguments> provideCompareVersionsArguments() {
|
||||
|
@ -46,7 +46,7 @@ import org.osgi.service.http.HttpService;
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public abstract class AbstractAudioServletTest extends JavaTest {
|
||||
|
||||
|
@ -45,7 +45,7 @@ import org.openhab.core.types.State;
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ItemStateConditionHandlerTest {
|
||||
|
||||
|
@ -40,7 +40,7 @@ import org.openhab.core.test.java.JavaTest;
|
||||
* @author Simon Kaufmann - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ConfigDescriptionRegistryTest extends JavaTest {
|
||||
|
||||
|
@ -43,7 +43,7 @@ import org.openhab.core.test.java.JavaTest;
|
||||
* @author Simon Kaufmann - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class MetadataConfigDescriptionProviderImplTest extends JavaTest {
|
||||
|
||||
|
@ -63,7 +63,7 @@ import org.openhab.core.thing.type.ThingTypeRegistry;
|
||||
* @author Henning Sudbrock - Added tests for auto-approving inbox entries
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class AutomaticInboxProcessorTest {
|
||||
|
||||
|
@ -64,7 +64,7 @@ import org.openhab.core.thing.type.ThingTypeRegistry;
|
||||
* @author Laurent Garnier - Added tests testApproveWithThingId and testApproveWithInvalidThingId
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class PersistentInboxTest {
|
||||
|
||||
|
@ -37,7 +37,7 @@ import org.mockito.quality.Strictness;
|
||||
* @author Markus Rathgeb - Base test classes without tests needs to be abstract
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public abstract class BaseHttpUtilTest {
|
||||
|
||||
|
@ -45,7 +45,7 @@ import org.openhab.core.io.net.http.TlsTrustManagerProvider;
|
||||
* @author Martin van Wingerden - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ExtensibleTrustManagerImplTest {
|
||||
|
||||
|
@ -44,7 +44,7 @@ import org.openhab.core.io.rest.LocaleService;
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ConfigDescriptionResourceTest {
|
||||
|
||||
|
@ -41,7 +41,7 @@ import org.openhab.core.items.MetadataRegistry;
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class MetadataSelectorMatcherTest {
|
||||
|
||||
|
@ -64,7 +64,7 @@ import org.openhab.core.ui.items.ItemUIRegistry;
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class SitemapResourceTest extends JavaTest {
|
||||
|
||||
|
@ -45,7 +45,7 @@ import org.mockito.quality.Strictness;
|
||||
* @author Wouter Born - Migrate tests from Groovy to Java and use Mockito
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class CorsFilterTest {
|
||||
|
||||
|
@ -42,7 +42,7 @@ import org.mockito.quality.Strictness;
|
||||
* @author Wouter Born - Migrate tests from Groovy to Java and use Mockito
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ProxyFilterTest {
|
||||
|
||||
|
@ -68,7 +68,7 @@ import net.wimpi.modbus.util.SerialParameters;
|
||||
* @author Sami Salonen - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class IntegrationTestSupport extends JavaTest {
|
||||
|
||||
|
@ -44,7 +44,7 @@ import org.openhab.core.io.transport.upnp.UpnpIOParticipant;
|
||||
* @author Andre Fuechsel - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class UpnpIOServiceTest {
|
||||
|
||||
|
@ -40,7 +40,7 @@ import org.openhab.core.semantics.model.location.Indoor;
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
public class SemanticsTest {
|
||||
|
||||
private @Mock ItemRegistry mockedItemRegistry;
|
||||
|
@ -54,7 +54,7 @@ import org.openhab.core.persistence.PersistenceServiceRegistry;
|
||||
* @author Jan N. Klug - Fix averageSince calculation
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class PersistenceExtensionsTest {
|
||||
|
||||
|
@ -42,7 +42,7 @@ import org.openhab.core.library.items.SwitchItem;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
public class SemanticsMetadataProviderTest {
|
||||
|
||||
private static final String ITEM_NAME = "switchItem";
|
||||
|
@ -44,7 +44,7 @@ import org.osgi.framework.BundleContext;
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
class BaseDynamicCommandDescriptionProviderTest {
|
||||
|
||||
|
@ -44,7 +44,7 @@ import org.osgi.framework.BundleContext;
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
class BaseDynamicStateDescriptionProviderTest {
|
||||
|
||||
|
@ -61,7 +61,7 @@ import org.openhab.core.thing.type.ChannelTypeRegistry;
|
||||
* @author Kai Kreuzer - added tests with multiple links
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class AutoUpdateManagerTest {
|
||||
|
||||
|
@ -47,7 +47,7 @@ import org.osgi.framework.Bundle;
|
||||
* @author Simon Kaufmann - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ThingManagerImplTest {
|
||||
|
||||
|
@ -85,7 +85,7 @@ import org.openhab.core.ui.items.ItemUIProvider;
|
||||
* @author Kai Kreuzer - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ItemUIRegistryImplTest {
|
||||
|
||||
|
@ -48,7 +48,7 @@ import org.osgi.service.http.HttpService;
|
||||
* @author Kai Kreuzer - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ProxyServletServiceTest {
|
||||
|
||||
|
@ -39,7 +39,7 @@ import org.openhab.core.scheduler.ScheduledCompletableFuture;
|
||||
* @author Hilbrand Bouwkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class DelegatedSchedulerTest {
|
||||
|
||||
|
@ -45,7 +45,7 @@ import org.openhab.core.types.util.UnitUtils;
|
||||
* @author Stefan Triller - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class NumberItemTest {
|
||||
|
||||
|
@ -36,7 +36,7 @@ import org.osgi.framework.ServiceReference;
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class HttpServiceUtilTest {
|
||||
|
||||
|
@ -39,7 +39,7 @@ import org.openhab.core.config.discovery.usbserial.linuxsysfs.testutil.UsbSerial
|
||||
* @author Henning Sudbrock - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class PollingUsbSerialScannerTest {
|
||||
|
||||
|
@ -66,7 +66,7 @@ import com.jayway.jsonpath.JsonPath;
|
||||
* @author Henning Treu - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ItemResourceOSGiTest extends JavaOSGiTest {
|
||||
|
||||
|
@ -55,7 +55,7 @@ import com.jayway.jsonpath.JsonPath;
|
||||
* @author Christoph Weitkamp - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ItemChannelLinkResourceOSGiTest extends JavaOSGiTest {
|
||||
|
||||
|
@ -49,7 +49,7 @@ import org.openhab.core.thing.type.ChannelTypeUID;
|
||||
* @author Stefan Triller - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class ProfileTypeResourceTest extends JavaTest {
|
||||
|
||||
|
@ -46,7 +46,7 @@ import org.osgi.framework.ServiceRegistration;
|
||||
* @author Simon Kaufmann - migrated from Groovy to Java
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class OSGiEventManagerOSGiTest extends JavaOSGiTest {
|
||||
|
||||
|
@ -75,7 +75,7 @@ import tech.units.indriya.unit.Units;
|
||||
* @author Stefan Triller - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class GroupItemOSGiTest extends JavaOSGiTest {
|
||||
|
||||
|
@ -95,7 +95,7 @@ import org.osgi.service.component.ComponentContext;
|
||||
* @author Wouter Born - Migrate tests from Groovy to Java
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@SuppressWarnings("null")
|
||||
@NonNullByDefault
|
||||
public class BindingBaseClassesOSGiTest extends JavaOSGiTest {
|
||||
|
@ -88,7 +88,7 @@ import org.openhab.core.types.StateDescriptionFragmentBuilder;
|
||||
* @author Simon Kaufmann - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class CommunicationManagerOSGiTest extends JavaOSGiTest {
|
||||
|
||||
|
@ -84,7 +84,7 @@ import org.osgi.framework.Bundle;
|
||||
* thing UID and firmware version
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class FirmwareUpdateServiceTest extends JavaOSGiTest {
|
||||
|
||||
|
@ -49,7 +49,7 @@ import org.openhab.core.thing.type.ChannelType;
|
||||
* @author Simon Kaufmann - Initial contribution
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@MockitoSettings(strictness = Strictness.WARN)
|
||||
@MockitoSettings(strictness = Strictness.LENIENT)
|
||||
@NonNullByDefault
|
||||
public class SystemProfileFactoryOSGiTest extends JavaOSGiTest {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user