Skip to content

Commit

Permalink
removing executor, but better
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfmurdock committed Jul 19, 2023
1 parent 6651217 commit e4a15ce
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import com.zegreatrob.coupling.model.pairassignmentdocument.TimeResultValue
import com.zegreatrob.coupling.model.pairassignmentdocument.calculateTimeSinceLastPartnership
import com.zegreatrob.coupling.model.pairassignmentdocument.pairOf
import com.zegreatrob.coupling.model.player.Player
import com.zegreatrob.testmints.action.async.SimpleSuspendAction
import com.zegreatrob.testmints.action.annotation.ActionMint

@ActionMint
data class CreatePairCandidateReportAction(
val player: Player,
val history: List<PairAssignmentDocument>,
val allPlayers: List<Player>,
) : SimpleSuspendAction<CreatePairCandidateReportAction.Dispatcher, PairCandidateReport> {
override val performFunc = link(Dispatcher::perform)
) {

interface Dispatcher {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.zegreatrob.minassert.assertIsEqualTo
import com.zegreatrob.minspy.Spy
import com.zegreatrob.minspy.SpyData
import com.zegreatrob.minspy.spyFunction
import com.zegreatrob.testmints.action.ExecutableActionExecutor
import com.zegreatrob.testmints.async.asyncSetup
import kotlinx.coroutines.channels.Channel
import kotools.types.collection.notEmptyListOf
Expand All @@ -22,10 +21,7 @@ class FindNewPairsActionTest {
interface FindNewPairsActionTestDispatcher :
NextPlayerAction.Dispatcher<FindNewPairsActionTestDispatcher>,
CreatePairCandidateReportListAction.Dispatcher<FindNewPairsActionTestDispatcher>,
CreatePairCandidateReportAction.Dispatcher {
override val execute: ExecutableActionExecutor<FindNewPairsActionTestDispatcher>
get() = TODO("Not yet implemented")
}
CreatePairCandidateReportAction.Dispatcher

@Test
fun withTwoPlayersEachShouldBeRemovedFromWheelBeforeEachPlay() = asyncSetup(object :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class GameExamplesTest {
override val wheel = this
override val actionDispatcher = this
override val cannon = ActionCannon(this)
override val execute = this
}

class WithUniformBadgesAndLongestTimeRule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.zegreatrob.coupling.model.player.Player
import com.zegreatrob.coupling.stubmodel.stubPlayer
import com.zegreatrob.coupling.testaction.StubCannon
import com.zegreatrob.minassert.assertIsEqualTo
import com.zegreatrob.testmints.action.ExecutableActionExecutor
import com.zegreatrob.testmints.async.ScopeMint
import com.zegreatrob.testmints.async.asyncSetup
import kotlinx.coroutines.channels.Channel
Expand All @@ -29,10 +28,7 @@ class ShufflePairsActionTest {
NextPlayerAction.Dispatcher<ShufflePairsActionInner>,
CreatePairCandidateReportListAction.Dispatcher<ShufflePairsActionInner>,
CreatePairCandidateReportAction.Dispatcher,
AssignPinsAction.Dispatcher {
override val execute: ExecutableActionExecutor<ShufflePairsActionInner>
get() = TODO("Not yet implemented")
}
AssignPinsAction.Dispatcher

@Test
fun willBuildAGameRunWithAllAvailablePlayersAndThenReturnTheResults() = asyncSetup(object :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.zegreatrob.coupling.server.action.pairassignmentdocument.NextPlayerAc
import com.zegreatrob.coupling.server.action.pairassignmentdocument.PairCandidateReport
import com.zegreatrob.coupling.testaction.StubCannon
import com.zegreatrob.minassert.assertIsEqualTo
import com.zegreatrob.testmints.action.ExecutableActionExecutor
import com.zegreatrob.testmints.async.ScopeMint
import com.zegreatrob.testmints.async.asyncSetup
import kotlinx.coroutines.channels.produce
Expand Down Expand Up @@ -53,8 +52,6 @@ class NextPlayerActionTest {
)
},
)
override val execute: ExecutableActionExecutor<CreatePairCandidateReportAction.Dispatcher>
get() = TODO("Not yet implemented")
}) exercise {
perform(NextPlayerAction(longestTimeSpin(players)))
} verify { result ->
Expand Down

0 comments on commit e4a15ce

Please sign in to comment.