This is a scala wrapper for moco. The purpose of this project is to leverage scala's elegant syntax to provide beautiful DSL for using moco in scala testing.
Add dependency:
libraryDependencies += "com.github.nicholasren" %% "moco-scala" % "0.3"
Try latest version:
if you want to try latest version, just add snapshot repo to dependency resolver
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
import com.github.nicholasren.moco.scala.dsl.SMoco._
val theServer = server(8080)
theServer when { uri("/hello") } then { status(200) }
theServer running {
assert(getForStatus(remoteUrl("/hello")) === 200)
}
api document can be found here.
also, please refer to functional tests for detail usage.
This project is still in process, any question and suggestion are more than welcomed.