1   package com.lexicalscope.fluentreflection;
2   
3   import static com.lexicalscope.fluentreflection.ReflectionMatchers.hasInterface;
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 TestMatcherTypeHasInterfaces extends AbstractTestReflectionMatcher<FluentClass<?>> {
12      @Override
13      protected FluentClass<?> target() {
14          return type;
15      }
16  
17      @Override
18      protected ReflectionMatcher<FluentClass<?>> matcher() {
19          return hasInterface(Object.class);
20      }
21  
22      @Override
23      protected void setupMatchingCase() {
24          whenTypeHasInterface(Object.class);
25      }
26  
27      @Override
28      protected void setupFailingCase() {
29          whenTypeHasNoInterface();
30      }
31  
32      @Override
33      protected Matcher<String> hasDescription() {
34          return equalTo("type that implements interface <class java.lang.Object>");
35      }
36  }