Class ContentResultMatchers

java.lang.Object
com.codename1.backend.test.ContentResultMatchers

public final class ContentResultMatchers extends Object
Expectations of the response body, from MockMvcResultMatchers.content().
  • Method Details

    • string

      public ResultMatcher string(String expected)
      The body is exactly this text.
    • bytes

      public ResultMatcher bytes(byte[] expected)
      The body is exactly these bytes.
    • contentType

      public ResultMatcher contentType(String expected)
      The Content-Type is this one, parameters included when it names any: application/json matches application/json;charset=utf-8, which a stricter test names in full.
    • contentTypeCompatibleWith

      public ResultMatcher contentTypeCompatibleWith(String expected)
      The Content-Type's type and subtype are compatible with this one; application/* and */* match anything in their range.
    • json

      public ResultMatcher json(String expected)
      The body is JSON holding everything expected does; objects may carry more fields. json(String, boolean) with true asks for exact equality.
    • json

      public ResultMatcher json(String expected, boolean strict)