Skip to content

Commit

Permalink
update device list
Browse files Browse the repository at this point in the history
  • Loading branch information
F43nd1r committed Sep 2, 2023
1 parent ade38f5 commit 3518c71
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -50,14 +50,14 @@ class DeviceSetup(private val deviceRepository: DeviceRepository, private val co
isHeaderExtractionEnabled = true
setProcessor(processor)
}).parse(stream.bufferedReader(Charsets.UTF_16LE))
processor.beans.filter { it.marketingName != null }.forEach { deviceRepository.store(it.device, it.model, it.marketingName!!) }
processor.beans.filter { it.device != null && it.marketingName != null }.forEach { deviceRepository.store(it.device!!, it.model, it.marketingName!!) }
}
}

@NoArgConstructor
class Device(
@Parsed(field = ["Device"])
val device: String,
val device: String?,
@Parsed(field = ["Model"])
val model: String,
@Parsed(field = ["Marketing Name"])
Expand Down
Binary file modified acrarium/src/main/resources/devices.csv
Binary file not shown.
Expand Up @@ -39,6 +39,6 @@ class DeviceSetupTest(
fun `should set up devices`() {
deviceSetup.onStartup(ContextRefreshedEvent(applicationContext))

expectThat(jooq.fetchCount(DEVICE)).isEqualTo(35002)
expectThat(jooq.fetchCount(DEVICE)).isEqualTo(36317)
}
}

0 comments on commit 3518c71

Please sign in to comment.