Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val settingsHelper = ProjectSettingsHelper("au.id.tmm","bfect")()
val settingsHelper = ProjectSettingsHelper("au.id.tmm", "bfect")()

settingsHelper.settingsForBuild

Expand Down Expand Up @@ -40,7 +40,14 @@ lazy val interopCats = project
.in(file("interop/cats"))
.settings(settingsHelper.settingsForSubprojectCalled("interop-cats"))
.settings(
libraryDependencies += "org.typelevel" %% "cats-effect" % catsVersion,
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsVersion,
"org.typelevel" %% "cats-laws" % catsVersion % Test,
"org.typelevel" %% "cats-effect-laws" % "2.3.1" % Test,
"org.typelevel" %% "discipline-scalatest" % "2.1.1" % Test,
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.3" % Test,
"org.scalatestplus" %% "scalacheck-1-15" % "3.2.3.0" % Test,
),
)
.dependsOn(core, core % "test->test")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package au.id.tmm.bfect.interop.cats

import au.id.tmm.bfect.interop.cats.implicits._
import cats.data.EitherT
import cats.effect.IO._
import cats.effect._
import cats.effect.laws.discipline.{AsyncTests, SyncTests}
import cats.instances.all._
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.scalacheck.Checkers
import org.typelevel.discipline.scalatest.FunSuiteDiscipline
import cats.effect.laws.discipline.arbitrary._
import cats.effect.laws.util.{TestContext, TestInstances}
import cats.laws.discipline.arbitrary._

class CatsEffectLawsForBfectSpec extends AnyFunSuite with FunSuiteDiscipline with Checkers with TestInstances {
implicit val testContext: TestContext = TestContext()
type F[A] = EitherT[IO, Throwable, A]
checkAll("EitherT.SyncTests", SyncTests[F].sync[Int, Boolean, String])
checkAll("EitherT.AsyncTests", AsyncTests[F].async[Int, Boolean, String])
}