org.unitils.database.annotations
Annotation Type TestDataSource


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface TestDataSource

Annotation indicating that this field or method should be initialized with the DataSource that supplies a connection to the unit test database.

If a field is annotated, it should be of type DataSource. This field can be private. Example:


 '    @DataSource
      private DataSource dataSource;
 
If a method is annotated, the method should have 1 DataSource argument. Example:

 '    @DataSource
      void myMethod(DataSource dataSource)
 

Author:
Filip Neven, Tim Ducheyne



Copyright © 2011. All Rights Reserved.