FlashAttributeResultMatchers (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.test.web.servlet.result

## Class FlashAttributeResultMatchers

- java.lang.Object
- - org.springframework.test.web.servlet.result.FlashAttributeResultMatchers

-     public class FlashAttributeResultMatchers
      extends Object

  Factory for "output" flash attribute assertions. An instance of this class is typically accessed via `MockMvcResultMatchers.flash()`.
  Since:
    3.2
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FlashAttributeResultMatchers()` Protected constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> ResultMatcher` | `attribute(String name, org.hamcrest.Matcher<T> matcher)` Assert a flash attribute's value with the given Hamcrest `Matcher`.
    `<T> ResultMatcher` | `attribute(String name, Object value)` Assert a flash attribute's value.
    `<T> ResultMatcher` | `attributeCount(int count)` Assert the number of flash attributes.
    `<T> ResultMatcher` | `attributeExists(String... names)` Assert the existence of the given flash attributes.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FlashAttributeResultMatchers

          protected FlashAttributeResultMatchers()

      Protected constructor. Use `MockMvcResultMatchers.flash()`.

  - ### Method Detail

    - #### attribute

          public <T> ResultMatcher attribute(String name,
                                    org.hamcrest.Matcher<T> matcher)

      Assert a flash attribute's value with the given Hamcrest `Matcher`.

    - #### attribute

          public <T> ResultMatcher attribute(String name,
                                    Object value)

      Assert a flash attribute's value.

    - #### attributeExists

          public <T> ResultMatcher attributeExists(String... names)

      Assert the existence of the given flash attributes.

    - #### attributeCount

          public <T> ResultMatcher attributeCount(int count)

      Assert the number of flash attributes.