1 package com.lexicalscope.fluentreflection;
2
3 import static com.lexicalscope.fluentreflection.ReflectionMatchers.hasNoInterfaces;
4 import static org.hamcrest.Matchers.equalTo;
5
6 import org.hamcrest.Matcher;
7
8 import com.lexicalscope.fluentreflection.FluentClass;
9 import com.lexicalscope.fluentreflection.ReflectionMatcher;
10
11 public class TestMatcherTypeHasNoInterfaces extends AbstractTestReflectionMatcher<FluentClass<?>> {
12 @Override
13 protected FluentClass<?> target() {
14 return type;
15 }
16
17 @Override
18 protected ReflectionMatcher<FluentClass<?>> matcher() {
19 return hasNoInterfaces();
20 }
21
22 @Override
23 protected void setupMatchingCase() {
24 whenTypeHasNoInterface();
25 }
26
27 @Override
28 protected void setupFailingCase() {
29 whenTypeHasInterface(Object.class);
30 }
31
32 @Override
33 protected Matcher<String> hasDescription() {
34 return equalTo("type that implements no interfaces");
35 }
36 }