Java Code Examples for org.hamcrest.CoreMatchers#is()
The following examples show how to use
org.hamcrest.CoreMatchers#is() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractTypeDescriptionTest.java From byte-buddy with Apache License 2.0 | 5 votes |
@Test public void testEnclosingMethod() throws Exception { for (Class<?> type : standardTypes) { Matcher<MethodDescription> matcher; if (type.getEnclosingMethod() != null) { matcher = CoreMatchers.<MethodDescription>is(new MethodDescription.ForLoadedMethod(type.getEnclosingMethod())); } else if (type.getEnclosingConstructor() != null) { matcher = CoreMatchers.<MethodDescription>is(new MethodDescription.ForLoadedConstructor(type.getEnclosingConstructor())); } else { matcher = nullValue(MethodDescription.class); } assertThat(describe(type).getEnclosingMethod(), matcher); } }
Example 2
Source File: ExtraMatchers.java From astor with GNU General Public License v2.0 | 4 votes |
public static org.hamcrest.Matcher<java.lang.Object> clazz(java.lang.Class<?> type) { return CoreMatchers.is(type); }
Example 3
Source File: ExtraMatchers.java From astor with GNU General Public License v2.0 | 4 votes |
public static org.hamcrest.Matcher<java.lang.Object> clazz(java.lang.Class<?> type) { return CoreMatchers.is(type); }
Example 4
Source File: ThrowableMessageMatcher.java From catch-exception with Apache License 2.0 | 4 votes |
/** * @param expectedMessage * the expected throwable message */ public ThrowableMessageMatcher(String expectedMessage) { super(); this.expectedMessageMatcher = CoreMatchers.is(expectedMessage); }
Example 5
Source File: ExceptionMessageMatcher.java From catch-exception with Apache License 2.0 | 4 votes |
/** * @param expectedMessage * the expected exception message */ public ExceptionMessageMatcher(String expectedMessage) { super(); this.expectedMessageMatcher = CoreMatchers.is(expectedMessage); }