Mark field as resource path

已回答

Hi. My team is working on annotation for unit tests, which help to insert data into DB before a test. 

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
@Inherited
public @interface DbSet {
String[] before() default "";
}

...
@Test
@DbSet(before = "before.csv")
public void test() {
....
}

 

"before.csv" - is a relative resource of current test class. But IDEA don't mark it with helpful symlink to file. Are there any possibility to do it?

 

0

Hello,

Please clarify do I get it right that 

@DbSet

is the custom annotation? If yes, navigation from the custom annotations' values is not supported. Though you may create a plugin for it. 

Thank you  

0

请先登录再写评论。