import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
@ExtendWith(MockitoExtension.class)
@MockitoSettings(strictness = Strictness.WARN)
@NonNullByDefault
-@Disabled("Needs to be updated for OH3")
public class BluetoothDiscoveryServiceTest {
private static final int TIMEOUT = 2000;
private ThingTypeUID typeUID;
public MockDiscoveryParticipant() {
- this.typeUID = new ThingTypeUID("mock", RandomStringUtils.randomAlphabetic(6));
+ this.typeUID = new ThingTypeUID(BluetoothBindingConstants.BINDING_ID,
+ RandomStringUtils.randomAlphabetic(6));
}
@Override
@Override
public @Nullable DiscoveryResult createResult(BluetoothDiscoveryDevice device) {
+ String repProp = RandomStringUtils.randomAlphabetic(6);
return DiscoveryResultBuilder.create(getThingUID(device)).withLabel(RandomStringUtils.randomAlphabetic(6))
- .withRepresentationProperty(RandomStringUtils.randomAlphabetic(6))
+ .withProperty(repProp, RandomStringUtils.randomAlphabetic(6)).withRepresentationProperty(repProp)
.withBridge(device.getAdapter().getUID()).build();
}