org.specs2.spring.web

WebObject

class WebObject[B <: WebObjectBody] extends AnyRef

Represents processed and pre-chewed HttpServletResponse so that you can write meaningful code in your examples. The instances of {{WebObject}} carry the originating {{request}}, the matching {{response}}, together with extracted {{modelAndView}} and a pre-processed {{body}}. The methods {{<<}}, {{>>}} and {{>>!}} manipulate the {{body}}, allowing you to get or set the value of some HTML element, execute arbitrary JavaScript, examine the PDF, ... (depending on what payload processing traits you mixin to your test). Finally, the {{model}} and {{modelOption}} give you access to the model elements of the {{ModelAndView}} returned from the controller processing.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. WebObject
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WebObject(request: MockHttpServletRequest, response: MockHttpServletResponse, modelAndView: Option[ModelAndView], bodyOption: Option[B])

Type Members

  1. class Model extends AnyRef

    Convenient wrapper around the model portion of the {{ModelAndView}}

Value Members

  1. def !: B

    Returns the payload of the web object's body

    Returns the payload of the web object's body

    returns

    the body of the response

  2. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  3. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def ##(): Int

    Definition Classes
    AnyRef → Any
  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def body: B

  9. val bodyOption: Option[B]

  10. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def model: Model

    Gets the convenient wrapper around the Spring model portion of the {{ModelAndView}}

    Gets the convenient wrapper around the Spring model portion of the {{ModelAndView}}

    returns

    the model

  18. val modelAndView: Option[ModelAndView]

  19. def modelOption: Option[Model]

    Gets the convenient wrapper around the Spring model portion of the {{ModelAndView}}

    Gets the convenient wrapper around the Spring model portion of the {{ModelAndView}}

    returns

    the model of the {{ModelAndView}}, if available

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. val request: MockHttpServletRequest

  24. val response: MockHttpServletResponse

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any