Skip to content

Commit

Permalink
fix unit pool test
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineThreepwood committed Dec 27, 2023
1 parent 5b57814 commit 18b7798
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.openbase.bco.dal.remote.layer.unit
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.Timeout
import org.openbase.bco.dal.lib.layer.unit.UnitRemote
import org.openbase.bco.dal.test.AbstractBCODeviceManagerTest
import org.openbase.bco.registry.remote.Registries
import org.openbase.jul.pattern.Filter
Expand Down Expand Up @@ -41,12 +42,12 @@ class CustomUnitPoolTest : AbstractBCODeviceManagerTest() {
@Timeout(10)
@Throws(Exception::class)
fun testUnitPool() {
val customUnitPool: CustomUnitPool<*, *> = CustomUnitPool<Any, Any>()
val customUnitPool: CustomUnitPool<*, *> = CustomUnitPool<UnitConfig, UnitRemote<UnitConfig>>()
Assertions.assertEquals(false, customUnitPool.isActive(), "pool is active while never activated")
customUnitPool.activate()
customUnitPool.init(
Filter<UnitConfig> { unitConfig: Any -> unitConfig.hasId() },
Filter<UnitConfig> { unitConfig: Any -> unitConfig.getUnitType() === UnitTemplateType.UnitTemplate.UnitType.BUTTON })
Filter<UnitConfig> { unitConfig: UnitConfig -> unitConfig.hasId() },
Filter<UnitConfig> { unitConfig: UnitConfig -> unitConfig.unitType === UnitTemplateType.UnitTemplate.UnitType.BUTTON })

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style. Warning test

Line detected that is longer than the defined maximum line length in the code style.
customUnitPool.activate()
for (unitRemote in customUnitPool.internalUnitList) {
Assertions.assertEquals(
Expand Down

0 comments on commit 18b7798

Please sign in to comment.