Skip to content

Commit aca7eb0

Browse files
committed
Remove dependency to javax.annotation-api.
1 parent b9c3e46 commit aca7eb0

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package ${package};
2+
${imports}
3+
/**
4+
* {@link ${class_to_assert}} specific assertions - Generated by CustomAssertionGenerator.
5+
*/
6+
@edu.hm.hafner.util.Generated(value="assertj-assertions-generator")
7+
public class ${custom_assertion_class} extends AbstractObjectAssert<${custom_assertion_class}, ${class_to_assert}> {
8+
9+
/**
10+
* Creates a new <code>{@link ${custom_assertion_class}}</code> to make assertions on actual ${class_to_assert}.
11+
* @param actual the ${class_to_assert} we want to make assertions on.
12+
*/
13+
public ${custom_assertion_class}(${class_to_assert} actual) {
14+
super(actual, ${custom_assertion_class}.class);
15+
}
16+
17+
/**
18+
* An entry point for ${custom_assertion_class} to follow AssertJ standard <code>assertThat()</code> statements.<br>
19+
* With a static import, one can write directly: <code>assertThat(my${class_to_assert})</code> and get specific assertion with code completion.
20+
* @param actual the ${class_to_assert} we want to make assertions on.
21+
* @return a new <code>{@link ${custom_assertion_class}}</code>
22+
*/
23+
@org.assertj.core.util.CheckReturnValue
24+
public static ${custom_assertion_class} assertThat(${class_to_assert} actual) {
25+
return new ${custom_assertion_class}(actual);
26+
}

etc/assertj-templates/assertions_entry_point_class_template.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package ${package};
55
* type-specific assertion objects.
66
*/
77
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM")
8-
@javax.annotation.Generated(value="assertj-assertions-generator")
8+
@edu.hm.hafner.util.Generated(value="assertj-assertions-generator")
99
public class Assertions extends org.assertj.core.api.Assertions {
1010
${all_assertions_entry_points}
1111
/**

etc/assertj-templates/soft_assertions_entry_point_class_template.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package ${package};
44
* Entry point for soft assertions of different data types.
55
*/
66
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM")
7-
@javax.annotation.Generated(value="assertj-assertions-generator")
7+
@edu.hm.hafner.util.Generated(value="assertj-assertions-generator")
88
public class SoftAssertions extends org.assertj.core.api.AutoCloseableSoftAssertions {
99
${all_assertions_entry_points}
1010
}

0 commit comments

Comments
 (0)