@Target(value=TYPE) @Retention(value=RUNTIME) public @interface ContractImpl
For example
@RunWith( ContractSuite.class )
@ContractImpl( FooImpl.class ) public class Foo_Test {...}
Declares FooImpl as the implementation that the contract suite
should be built for.
The value of the annotation (FooImpl.class) in the above example) defines the class that will be scanned for interfaces. The set of contract tests are then scanned looking for tests for those interfaces. Tests from all matching Contract tests are then added to the current test class.
NOTE: In some cases only the interface is known, not the
implementation. In these cases a testing interface may be created and that
class used in the ContractImpl annotation. For example assume that you want
to test an interface A. create an interface:
interface ATester extends A{}; and in the ContractImpl
annotation use ATester.class
public abstract Class<?> value
public abstract Class<?>[] skip
public abstract Class<?>[] ignore
Copyright © 2013-2016 XENEI.com. All Rights Reserved.