org.springframework.test.web.servlet.result

## Class ViewResultMatchers

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

    public class ViewResultMatchers
    extends Object

Factory for assertions on the selected view. An instance of this class is typically accessed via `MockMvcResultMatchers.view()`.

Since:
  3.2

### Constructor Summary

Constructors
`protected` `ViewResultMatchers()` Protected constructor.

### Method Summary

Methods
`ResultMatcher` `name(org.hamcrest.Matcher<? super String> matcher)` Assert the selected view name with the given Hamcrest `Matcher`.
`ResultMatcher` `name(String expectedViewName)` Assert the selected view name.

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

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

### Constructor Detail

#### ViewResultMatchers

    protected ViewResultMatchers()

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

### Method Detail

#### name

    public ResultMatcher name(org.hamcrest.Matcher<? super String> matcher)

Assert the selected view name with the given Hamcrest `Matcher`.

#### name

    public ResultMatcher name(String expectedViewName)

Assert the selected view name.