JetBrains / JetBrains/Exposed

Mock exposed model's `select` results

Open
#688 5 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Kotlin
Stars
9.3k
Forks
798
Avg merge
4d 2h
Merged PRs (30d)
26

Description

We are using exposed 0.8.5. We are writing junits for our method which is as follows.

` override fun findById(id: Int): ModelObject? =
ExposedModel
.select { ExposedModel.id.eq(id) }
.map { it.asModelObject() }
.firstOrNull()`
We have mocked `ExposedModel.select`. But what should we in return values??
We need to test the map function here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.