public class PrototypeMatcher<T>
extends org.hamcrest.TypeSafeDiagnosingMatcher<T>
Matcher for matching a predefined Prototyped| Constructor and Description |
|---|
PrototypeMatcher(T stub) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
static <M> PrototypeMatcher<M> |
matchesPrototype(M prototype)
Creates a matcher that matches a prototype create using Expectamundo#prototype against an expected instance
For example:
|
protected boolean |
matchesSafely(T actual,
org.hamcrest.Description mismatchDescription) |
public PrototypeMatcher(T stub)
public static <M> PrototypeMatcher<M> matchesPrototype(M prototype)
MyObject expected = Expectamundo.prototype(MyObject.class);
Expectamundo.expect(expected.getValue()).hasPattern("A*");
assertThat(new MyObject("ATest), matchesPrototype(expected));
prototype - the prototype to use for the matchpublic void describeTo(org.hamcrest.Description description)
Copyright © 2015. All rights reserved.