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
/* | |
This showcases how to use a Testcontainers provided database to test a Spring | |
Boot application while isolating every test so that changes to the database | |
does not interfere with other tests. | |
It accomplishes this without any reliance on implementation details to empty | |
out specific tables or anything else. There is no global "rollback only" | |
transaction semantics. You can run assertions against the actual data in the | |
database if desired, including any schema changes. |
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
import scalaz._, Scalaz._ | |
object ErrorHandlingExample { | |
type PartNumber = String | |
sealed trait CpuType | |
case object Intel extends CpuType | |
case object Qualcomm extends CpuType | |
case class PhoneSpec( |
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
sealed trait Interact[A] | |
case class Ask(prompt: String) | |
extends Interact[String] | |
case class Tell(msg: String) | |
extends Interact[Unit] | |
trait Monad[M[_]] { | |
def pure[A](a: A): M[A] |