update get type(s) for pagination and filter
- update TypesEndpoint for all new endpoints - update application to use properties for sql script - update types controller - update types.http for all types of types calls - update test mocking for service - update getTypes to use filter, page, and show in TypesController - add validation dependency - update unit test for uuid assertion from test library in - remove UUIDAssert.kt - update IdentityControllerTest - update MappingKtTest - update NodeControllerTest - update TypeControllerTest - update TypesControllerTest - add test library dependency - update getTypes to handle filter limit and offset in TypeService - update TypeRepository - add findAllContaining with filter, limit and offset - add findAll with limit and offset - update type database with specific name key - split Type and Types
This commit is contained in:
@@ -8,11 +8,11 @@ import java.time.ZoneId
|
||||
import java.time.ZonedDateTime
|
||||
import java.util.UUID
|
||||
import kotlin.test.Test
|
||||
import ltd.hlaeja.assertj.assertThat
|
||||
import ltd.hlaeja.entity.NodeEntity
|
||||
import ltd.hlaeja.entity.TypeEntity
|
||||
import ltd.hlaeja.library.deviceRegistry.Type
|
||||
import ltd.hlaeja.library.deviceRegistry.Node
|
||||
import ltd.hlaeja.library.deviceRegistry.Type
|
||||
import ltd.hlaeja.test.isEqualToUuid
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.jupiter.api.AfterEach
|
||||
import org.junit.jupiter.api.Assertions.assertThrows
|
||||
@@ -68,7 +68,7 @@ class MappingKtTest {
|
||||
val response = entity.toTypeResponse()
|
||||
|
||||
// then
|
||||
assertThat(response.id).isUUID("00000000-0000-0000-0000-000000000000")
|
||||
assertThat(response.id).isEqualToUuid("00000000-0000-0000-0000-000000000000")
|
||||
assertThat(response.name).isEqualTo("name")
|
||||
}
|
||||
|
||||
@@ -119,9 +119,9 @@ class MappingKtTest {
|
||||
val result = entity.toNodeResponse()
|
||||
|
||||
// then
|
||||
assertThat(result.id).isUUID("00000000-0000-0000-0000-000000000001")
|
||||
assertThat(result.client).isUUID("00000000-0000-0000-0000-000000000002")
|
||||
assertThat(result.device).isUUID("00000000-0000-0000-0000-000000000003")
|
||||
assertThat(result.id).isEqualToUuid("00000000-0000-0000-0000-000000000001")
|
||||
assertThat(result.client).isEqualToUuid("00000000-0000-0000-0000-000000000002")
|
||||
assertThat(result.device).isEqualToUuid("00000000-0000-0000-0000-000000000003")
|
||||
assertThat(result.name).isEqualTo("test")
|
||||
}
|
||||
|
||||
@@ -164,9 +164,9 @@ class MappingKtTest {
|
||||
val result = entity.toIdentityResponse()
|
||||
|
||||
// then
|
||||
assertThat(result.node).isUUID("00000000-0000-0000-0000-000000000001")
|
||||
assertThat(result.client).isUUID("00000000-0000-0000-0000-000000000002")
|
||||
assertThat(result.device).isUUID("00000000-0000-0000-0000-000000000003")
|
||||
assertThat(result.node).isEqualToUuid("00000000-0000-0000-0000-000000000001")
|
||||
assertThat(result.client).isEqualToUuid("00000000-0000-0000-0000-000000000002")
|
||||
assertThat(result.device).isEqualToUuid("00000000-0000-0000-0000-000000000003")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user