-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
EnhancementNew feature or requestNew feature or requestPlannedPlanned and roadmapped workPlanned and roadmapped work
Milestone
Description
Provide a brief summary of the planned work
Now that all packages are organized by feature, it is time to group the test tooling by feature. This work refers to the "Stubs" test tool.
Detailed overview
As the project was migrated from other languages, test stubs were dumped to the same file for convenience, growing to ~1000 lines. This is, of course, a red flag. 🚩
Now that the project is in a stable phase, it makes sense to regroup the stubs into feature-based groups.
Hint/location:
com.appifyhub.monolith.util.Stubs
Today:
object Stubs {
// region Domain Models
val userId = UserId(
userId = "username",
projectId = 1,
)
// endregion Domain Models
}Tomorrow:
object Stubs {
user: UserStubs // or whatever the name is
}
object UserStubs {
val id = UserId(
userId = "username",
projectId = 1,
)
}This doesn't serve a cosmetic purpose only, but also helps with auto-complete in tests:
// before: autocomplete lists 300 properties from 'Stubs'
assertThat(expected).equalsTo(Stubs.userId)
// after: autocomplete lists only ~10 properties from 'Stubs', plus 10 from 'user'
assertThat(expected).equalsTo(Stubs.user.id)List the acceptance criteria
- All
Stubsare grouped by feature, matching the feature packages - All tests are updated to use the new stubs structure, and passing
Include any additional notes (optional)
No response
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or requestNew feature or requestPlannedPlanned and roadmapped workPlanned and roadmapped work
Type
Projects
Status
Ready