com.lexicalscope.fluentreflection
Class AbstractTestReflectionMatcher<T>

java.lang.Object
  extended by com.lexicalscope.fluentreflection.AbstractTestReflectionMatcher<T>
Direct Known Subclasses:
TestMatcherAnyReflectedType, TestMatcherArgumentCount, TestMatcherConstructorReflectingOn, TestMatcherElementDeclaredBy, TestMatcherElementHasNameContaining, TestMatcherElementHasNameEndingWith, TestMatcherElementHasNameMatching, TestMatcherElementHasNameStartingWith, TestMatcherElementHasVoidReturn, TestMatcherElementNamed, TestMatcherElementWithArguments, TestMatcherReflectedTypeReflectingOn, TestMatcherTypeHasInterfaces, TestMatcherTypeHasNoInterfaces, TestMatcherTypeHasNoSuperclasses, TestMatcherTypeIsInterface

public abstract class AbstractTestReflectionMatcher<T>
extends Object


Field Summary
protected  FluentMember callable
           
protected  FluentConstructor<?> constructor
           
 com.lexicalscope.fluentreflection.JUnitRuleMockery context
           
protected  FluentMethod method
           
protected  FluentClass<?> type
           
 
Constructor Summary
AbstractTestReflectionMatcher()
           
 
Method Summary
protected  void assertHasDescription(ReflectionMatcher<?> matcherUnderTest, org.hamcrest.Matcher<String> descriptionMatcher)
           
protected  T failingTarget()
           
protected abstract  org.hamcrest.Matcher<String> hasDescription()
           
protected abstract  ReflectionMatcher<? super T> matcher()
           
 void matcherCanFailToMatch()
           
 void matcherCanMatch()
           
 void matcherDescriptionMakesSense()
           
protected  void setupFailingCase()
           
protected  void setupMatchingCase()
           
protected abstract  T target()
           
protected  void whenMethodDeclaredBy(Class<?> declaringClass)
           
protected  void whenMethodHasArguments(Class<?>... arguments)
           
protected  void whenMethodHasName(String methodName)
           
protected  void whenType(Class<?> klass)
           
protected  void whenTypeHasInterface(Class<?> interfac3)
           
protected  void whenTypeHasNoInterface()
           
protected  void whenTypeHasNoSuperclass()
           
protected  void whenTypeHasSuperclass(Class<?> klass)
           
protected  void whenTypeIsInterface()
           
protected  void whenTypeIsNotInterface()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

public final com.lexicalscope.fluentreflection.JUnitRuleMockery context

method

protected final FluentMethod method

constructor

protected final FluentConstructor<?> constructor

type

protected final FluentClass<?> type

callable

protected final FluentMember callable
Constructor Detail

AbstractTestReflectionMatcher

public AbstractTestReflectionMatcher()
Method Detail

matcherCanMatch

public final void matcherCanMatch()
                           throws Throwable
Throws:
Throwable

matcherCanFailToMatch

public final void matcherCanFailToMatch()
                                 throws Throwable
Throws:
Throwable

matcherDescriptionMakesSense

public final void matcherDescriptionMakesSense()
                                        throws Throwable
Throws:
Throwable

target

protected abstract T target()

hasDescription

protected abstract org.hamcrest.Matcher<String> hasDescription()

setupMatchingCase

protected void setupMatchingCase()
                          throws Throwable
Throws:
Throwable

setupFailingCase

protected void setupFailingCase()
                         throws Throwable
Throws:
Throwable

matcher

protected abstract ReflectionMatcher<? super T> matcher()
                                                 throws Throwable
Throws:
Throwable

failingTarget

protected T failingTarget()

whenMethodHasName

protected final void whenMethodHasName(String methodName)

whenMethodDeclaredBy

protected final void whenMethodDeclaredBy(Class<?> declaringClass)

whenMethodHasArguments

protected final void whenMethodHasArguments(Class<?>... arguments)

whenTypeHasInterface

protected final void whenTypeHasInterface(Class<?> interfac3)

whenTypeHasSuperclass

protected final void whenTypeHasSuperclass(Class<?> klass)

whenTypeHasNoSuperclass

protected final void whenTypeHasNoSuperclass()

whenTypeHasNoInterface

protected final void whenTypeHasNoInterface()

whenTypeIsInterface

protected final void whenTypeIsInterface()

whenTypeIsNotInterface

protected final void whenTypeIsNotInterface()

whenType

protected final void whenType(Class<?> klass)

assertHasDescription

protected final void assertHasDescription(ReflectionMatcher<?> matcherUnderTest,
                                          org.hamcrest.Matcher<String> descriptionMatcher)


Copyright © 2011-2012 lexicalscope. All Rights Reserved.