Skip to content

Unisay/mockserver-client-scala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala client for the MockServer

Build Status

Implemented as a wrapper around Java Client

Examples

Simplest case

forAnyRequest respond BadRequest once

One-liner with request and response bodies

when get "/path" has "Request body" respond Ok + "Response body" exactly 3.times

All features:

when post "/user" has {
  param("email", "john.doe@gmail.com") and
  param("rating", 99) and
  ContentType("application/x-www-form-urlencoded") and
  body("firstName=John&lastName=Doe")
} after 10.seconds respond {
  Accepted and Location("http://localhost:8080/user/123")
} once

For more examples please see the test spec (DSLTest.scala)

Installation:

resolvers += Resolver.bintrayRepo("unisay", "maven")
libraryDependencies += "com.github.unisay" %% "mockserver-client-scala" % "0.3.0"

Releases

No releases published

Packages

No packages published

Languages