Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Stamann committed Mar 10, 2024
2 parents 2577261 + 62825f7 commit 4a306fb
Show file tree
Hide file tree
Showing 27 changed files with 211 additions and 614 deletions.
2 changes: 1 addition & 1 deletion coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>io.toolisticon.cute</groupId>
<artifactId>cute-parent</artifactId>
<version>1.0.1</version>
<version>1.1.0</version>
</parent>

<name>coverage</name>
Expand Down
2 changes: 1 addition & 1 deletion cute/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>io.toolisticon.cute</groupId>
<artifactId>cute-parent</artifactId>
<version>1.0.1</version>
<version>1.1.0</version>
</parent>

<name>cute</name>
Expand Down
35 changes: 29 additions & 6 deletions cute/src/main/java/io/toolisticon/cute/CuteApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Set;
Expand Down Expand Up @@ -289,14 +291,35 @@ public interface BlackBoxTestRootInterface {
@FluentApiInterface(CompilerTestBB.class)
public interface BlackBoxTestProcessorsInterface {

/**
* Allows you to add a single annotation processor used at black-box tests compilation.
*
* @param processor the annotation processor to use. null values are prohibited and will lead to a {@link io.toolisticon.fluapigen.validation.api.ValidatorException}.
* @return the next fluent interface
*/
BlackBoxTestSourceFilesInterface processor(@FluentApiBackingBeanMapping(value = "processors") @NotNull Class<? extends Processor> processor);


/**
* Allows you to add annotation processors used at black-box tests compilation.
* By passing no processors compilation will be done without using processors.
*
* Unfortunately this method will produce a warning of unsafe usage of varargs and can not be silenced on api side via the SafeVarargs annotation since it is defined in an interface.
* Please suppress the warning or use the processors method that takes a Collection as input parameter.
*
* @param processors the annotation processors to use. Empty value will compile the source files without using processors, null values are prohibited and will lead to a {@link io.toolisticon.fluapigen.validation.api.ValidatorException}.
* @return the next fluent interface
*/
BlackBoxTestSourceFilesInterface processors(@FluentApiBackingBeanMapping(value = "processors") @NotNull Class<? extends Processor>... processors);
@Deprecated
BlackBoxTestSourceFilesInterface processors(@FluentApiBackingBeanMapping(value = "processors") @NotNull Class<? extends Processor>... processors);

/**
* Allows you to add annotation processors used at black-box tests compilation.
*
* @param processors the annotation processors to use. Passing an empty collection will compile the source files without using processors, null values are prohibited and will lead to a {@link io.toolisticon.fluapigen.validation.api.ValidatorException}.
* @return the next fluent interface
*/
BlackBoxTestSourceFilesInterface processors(@FluentApiBackingBeanMapping(value = "processors") @NotNull Collection<Class<? extends Processor>> processors);

/**
* More obvious method not to use processors during compilation.
Expand All @@ -305,7 +328,7 @@ public interface BlackBoxTestProcessorsInterface {
* @return the next fluent interface
*/
default BlackBoxTestSourceFilesInterface noProcessors() {
return processors();
return processors(Collections.emptyList());
}

}
Expand Down Expand Up @@ -1125,8 +1148,8 @@ public interface GeneratedFileObjectCheck {
* Expect that a file exists that matches the passed FileObject.
* Matcher ignores line endings.
*
* @param expectedFileObject the FileOject used for comparison
* @return the next fluent inmterface
* @param expectedFileObject the FileObject used for comparison
* @return the next fluent interface
*/
default CompilerTestExpectAndThatInterface equals(FileObject expectedFileObject) {
return matches(ExpectedFileObjectMatcherKind.TEXT_IGNORE_LINE_ENDINGS, expectedFileObject);
Expand All @@ -1136,7 +1159,7 @@ default CompilerTestExpectAndThatInterface equals(FileObject expectedFileObject)
* Expect that a file exists that matches the passed FileObject.
*
* @param expectedFileObjectMatcherKind The matcher kind
* @param expectedFileObject the FileOject used for comparison
* @param expectedFileObject the FileObject used for comparison
* @return the next fluent interface
*/
default CompilerTestExpectAndThatInterface matches(ExpectedFileObjectMatcherKind expectedFileObjectMatcherKind, FileObject expectedFileObject) {
Expand Down Expand Up @@ -1172,7 +1195,7 @@ public <T extends FileObject> GeneratedFileObjectMatcher createMatcher(T expecte
}
},
/**
* Textual comparison line by line by ignoring the OS depending line-endings.
* Textual comparison line by line ignoring the OS dependent line-endings.
*/
TEXT_IGNORE_LINE_ENDINGS {
@Override
Expand Down
Loading

0 comments on commit 4a306fb

Please sign in to comment.