Skip to content

Commit a1e1315

Browse files
committed
add @BlankSource and @NullAndBlankSource
1 parent e32fff3 commit a1e1315

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package it.aboutbits.springboot.testing.valuesource;
2+
3+
import org.junit.jupiter.params.provider.ValueSource;
4+
5+
import java.lang.annotation.Documented;
6+
import java.lang.annotation.ElementType;
7+
import java.lang.annotation.Retention;
8+
import java.lang.annotation.RetentionPolicy;
9+
import java.lang.annotation.Target;
10+
11+
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
12+
@Retention(RetentionPolicy.RUNTIME)
13+
@Documented
14+
@ValueSource(strings = {"", " ", " ", "\t", "\r", "\n", "\r\n"})
15+
public @interface BlankSource {
16+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package it.aboutbits.springboot.testing.valuesource;
2+
3+
import org.junit.jupiter.params.provider.NullSource;
4+
5+
import java.lang.annotation.Documented;
6+
import java.lang.annotation.ElementType;
7+
import java.lang.annotation.Retention;
8+
import java.lang.annotation.RetentionPolicy;
9+
import java.lang.annotation.Target;
10+
11+
@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD})
12+
@Retention(RetentionPolicy.RUNTIME)
13+
@Documented
14+
@NullSource
15+
@BlankSource
16+
public @interface NullAndBlankSource {
17+
}

0 commit comments

Comments
 (0)