Last active
January 7, 2020 07:12
-
-
Save adamw/8e754b3e06bd9bd3ee3629b2cb6c609f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override protected def beforeAll(): Unit = { | |
super.beforeAll() | |
transactor = Transactor( | |
(), | |
(_: Unit) => Resource.pure(null), | |
KleisliInterpreter[IO]( | |
Blocker.liftExecutionContext(ExecutionContext.global)) | |
.ConnectionInterpreter, | |
Strategy.void | |
) | |
} | |
def newStubDaoConstantPoints(points: Int, | |
updatedPoints: AtomicInteger): Dao = new Dao { | |
override def currentPoints(userId: UUID): ConnectionIO[Int] = | |
points.pure[ConnectionIO] | |
override def updatePoints(userId: UUID, value: Int): ConnectionIO[Unit] = | |
Sync[ConnectionIO].delay(updatedPoints.set(value)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment