1 package com.lexicalscope.fluentreflection.endtoend;
2
3 import static com.lexicalscope.fluentreflection.FluentReflection.type;
4 import static com.lexicalscope.fluentreflection.ReflectionMatchers.hasType;
5
6 import org.junit.Test;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 public class TestReflectionMatchersHasReturnType {
25 public static interface A {
26
27 }
28
29 public static interface B {
30 A method();
31 Object otherMethod();
32 }
33
34 @Test public void canMatchReturnTypeByReflectedClass() {
35 type(B.class).method(hasType(type(A.class)));
36 }
37 }