1   package com.lexicalscope.fluentreflection.endtoend;
2   
3   import static com.lexicalscope.fluentreflection.FluentReflection.type;
4   import static com.lexicalscope.fluentreflection.ReflectionMatchers.hasArguments;
5   import static org.hamcrest.MatcherAssert.assertThat;
6   import static org.hamcrest.Matchers.equalTo;
7   
8   import org.junit.Test;
9   
10  /*
11   * Copyright 2012 Tim Wood
12   *
13   * Licensed under the Apache License, Version 2.0 (the "License");
14   * you may not use this file except in compliance with the License.
15   * You may obtain a copy of the License at
16   *
17   * http://www.apache.org/licenses/LICENSE-2.0
18   *
19   * Unless required by applicable law or agreed to in writing, software
20   * distributed under the License is distributed on an "AS IS" BASIS,
21   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22   * See the License for the specific language governing permissions and
23   * limitations under the License.
24   */
25  
26  public class TestReflectionMatchersArgumentTypes {
27      public static interface A {
28          Object method();
29      }
30  
31      @Test public void canMatchNoArguments() throws SecurityException, NoSuchMethodException {
32          assertThat(
33                  type(A.class).method(hasArguments()).member(),
34                  equalTo(A.class.getMethod("method")));
35      }
36  }