Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class ResultActions

  1. Object
  2. ResultActions
What to do with a MockMvc result: assert on it, act on it, or return it.

Methods

public ResultActions andExpect(ResultMatcher matcher) throws ExceptionAsserts one expectation, throwing AssertionError when it fails.
public ResultActions andExpectAll(ResultMatcher... matchers) throws ExceptionAsserts every expectation, reporting all the failures together.
public ResultActions andDo(ResultHandler handler) throws Exception
public MvcResult andReturn()

Inherited methods

Method details

andExpect

public ResultActions andExpect(ResultMatcher matcher) throws Exception
Asserts one expectation, throwing AssertionError when it fails.

Throws

Exception

andExpectAll

public ResultActions andExpectAll(ResultMatcher... matchers) throws Exception
Asserts every expectation, reporting all the failures together. A matcher that throws – a body that is not JSON, a header that is not a number – is one of the failures and the rest still run; an Error other than an assertion failure still ends the run.

Throws

Exception

andDo

public ResultActions andDo(ResultHandler handler) throws Exception

Throws

Exception

andReturn

public MvcResult andReturn()