BaseScalatraSpec

trait BaseScalatraSpec extends BeforeAfterAll with ScalatraTests

A base specification structure that starts the tester before the specification and stops it afterward. Clients probably want to extend ScalatraSpec or MutableScalatraSpec.

trait ScalatraTests
trait HttpComponentsClient
trait Client
trait ImplicitConversions
trait EmbeddedJettyContainer
trait JettyContainer
trait Container
trait BeforeAfterAll
trait FragmentsFactory
trait SpecificationStructure
trait ContextualSpecificationStructure
class Object
trait Matchable
class Any

Value members

Concrete methods

def afterAll(): Unit
def beforeAll(): Unit

Inherited methods

def addFilter(filter: Class[_ <: Filter], path: String, dispatches: EnumSet[DispatcherType]): FilterHolder
Inherited from:
JettyContainer
def addFilter(filter: Class[_ <: Filter], path: String): FilterHolder
Inherited from:
JettyContainer
def addFilter(filter: Filter, path: String, dispatches: EnumSet[DispatcherType]): FilterHolder
Inherited from:
JettyContainer
def addServlet(servlet: Class[_ <: HttpServlet], path: String): ServletHolder
Inherited from:
JettyContainer
def addServlet(servlet: HttpServlet, path: String, name: String): Unit
Inherited from:
JettyContainer
def addServlet(servlet: HttpServlet, path: String): Unit
Inherited from:
JettyContainer
def baseUrl: String
Inherited from:
EmbeddedJettyContainer
def body: String
Inherited from:
Client
def bodyBytes: Array[Byte]
Inherited from:
Client
def connect[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def contextPath: String
Inherited from:
EmbeddedJettyContainer
def createBody(name: String, content: Any): UploadableBody
Inherited from:
HttpComponentsClient
protected def createClient: CloseableHttpClient
Inherited from:
HttpComponentsClient
def decorate(is: SpecStructure, env: Env): SpecStructure
Inherited from:
SpecificationStructure
def delete[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
protected def fragmentFactory: FragmentFactory
Inherited from:
FragmentsFactory
def fragments: Env => Fragments
Inherited from:
ContextualSpecificationStructure
def get[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def get[A](uri: String, params: (String, String)*)(f: => A): A
Inherited from:
Client
def head[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def head[A](uri: String, params: (String, String)*)(f: => A): A
Inherited from:
Client
def header: header.type
Inherited from:
Client
def is: SpecStructure
Inherited from:
SpecificationStructure
def localPort: Option[Int]

The port of the currently running Jetty. May differ from port if port is 0.

The port of the currently running Jetty. May differ from port if port is 0.

Returns:

Some port if Jetty is currently listening, or None if it is not.

Inherited from:
EmbeddedJettyContainer
override def map(fs: => Fragments): Fragments

modify the fragments

modify the fragments

Definition Classes
BeforeAfterAll -> SpecificationStructure
Inherited from:
BeforeAfterAll
def map(fs: => Fragments, env: Env): Fragments

modify the fragments, using the current environment

modify the fragments, using the current environment

Inherited from:
SpecificationStructure
def map(structure: SpecStructure): SpecStructure

modify the specification structure

modify the specification structure

Inherited from:
SpecificationStructure
def mount(app: Filter, path: String, dispatches: EnumSet[DispatcherType]): FilterHolder
Inherited from:
JettyContainer
def mount(servlet: HttpServlet, path: String, name: String): Unit
Inherited from:
JettyContainer
def mount(servlet: HttpServlet, path: String): Unit
Inherited from:
JettyContainer
def mount(klass: Class[_], path: String): Holder[_ >: Servlet & Filter <: Servlet | Filter]
Inherited from:
JettyContainer
def options[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def patch[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def patch[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def patch[A](uri: String, params: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def patch[A](uri: String, params: (String, String)*)(f: => A): A
Inherited from:
Client
def port: Int

Sets the port to listen on. 0 means listen on any available port.

Sets the port to listen on. 0 means listen on any available port.

Inherited from:
EmbeddedJettyContainer
def post[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A
Inherited from:
Client
def post[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)], headers: Map[String, String])(f: => A): A
Inherited from:
Client
def post[A](uri: String, params: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def post[A](uri: String, params: (String, String)*)(f: => A): A
Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A
Inherited from:
Client
def put[A](uri: String, body: Array[Byte], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)], headers: Map[String, String])(f: => A): A
Inherited from:
Client
def put[A](uri: String, params: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
def put[A](uri: String, params: (String, String)*)(f: => A): A
Inherited from:
Client
def response: ClientResponse

Returns the current response within the scope of the submit method.

Returns the current response within the scope of the submit method.

Inherited from:
Client
def session[A](f: => A): A
Inherited from:
HttpComponentsClient
def skipDefaultServlet: Boolean
Inherited from:
JettyContainer
def start(): Unit
Inherited from:
EmbeddedJettyContainer
def status: Int
Inherited from:
Client
def stop(): Unit
Inherited from:
EmbeddedJettyContainer
def structure: Env => SpecStructure
Inherited from:
SpecificationStructure
def submit[A](method: String, path: String, queryParams: Iterable[(String, String)], headers: Iterable[(String, String)], body: Array[Byte])(f: => A): A
Inherited from:
HttpComponentsClient
protected def submitMultipart[A](method: String, path: String, params: Iterable[(String, String)], headers: Iterable[(String, String)], files: Iterable[(String, Any)])(f: => A): A
Inherited from:
HttpComponentsClient
def trace[A](uri: String, params: Iterable[(String, String)], headers: Iterable[(String, String)])(f: => A): A
Inherited from:
Client
protected def withResponse[A](res: ClientResponse)(f: => A): A
Inherited from:
Client

Inherited fields

var resourceBasePath: String
Inherited from:
Container
lazy val server: Server
Inherited from:
EmbeddedJettyContainer
lazy val servletContextHandler: ServletContextHandler
Inherited from:
EmbeddedJettyContainer

Implicits

Inherited implicits

implicit def stringToByteArray(str: String): Array[Byte]
Inherited from:
ImplicitConversions