Skip to content

Commit b993753

Browse files
committed
test(workers): Remove unused constructor arguments
Make the constructor arguments of `ContextFactoryTesteHelper` class properties because they were always initialized with the default values anyway. Signed-off-by: Martin Nonnenmacher <[email protected]>
1 parent d63d2f9 commit b993753

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

workers/common/src/test/kotlin/common/context/WorkerContextTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,16 +643,16 @@ private fun createSecret(path: String): Secret =
643643
/**
644644
* A test helper class managing a [WorkerContextFactory] instance and its dependencies.
645645
*/
646-
private class ContextFactoryTestHelper(
646+
private class ContextFactoryTestHelper {
647647
/** Mock for the [OrtRunRepository]. */
648-
val ortRunRepository: OrtRunRepository = mockk(),
648+
val ortRunRepository: OrtRunRepository = mockk()
649649

650650
/** Mock for the [RepositoryRepository]. */
651-
val repositoryRepository: RepositoryRepository = mockk(),
651+
val repositoryRepository: RepositoryRepository = mockk()
652652

653653
/** The factory to be tested. */
654654
val factory: WorkerContextFactory = WorkerContextFactory(config, ortRunRepository, repositoryRepository, mockk())
655-
) {
655+
656656
/**
657657
* Prepare the mock [OrtRunRepository] to be queried for the test run ID. Return a mock run that is also returned
658658
* by the repository.

0 commit comments

Comments
 (0)