mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2025-09-14 12:49:44 +02:00
Move testfixtures to own artifact
This commit is contained in:
parent
ca65cbe668
commit
b3b8da4e35
30 changed files with 29 additions and 8 deletions
|
@ -0,0 +1,30 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package sop.testsuite;
|
||||
|
||||
import sop.SOP;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Factory class to instantiate SOP implementations for testing.
|
||||
* Overwrite this class and the {@link #provideSOPInstances()} method to return the SOP instances you want
|
||||
* to test.
|
||||
* Then, add the following line to your <pre>build.gradle</pre> files <pre>dependencies</pre> section:
|
||||
* <pre>{@code
|
||||
* testImplementation(testFixtures("org.pgpainless:sop-java:<version>"))
|
||||
* }</pre>
|
||||
* To inject the factory class into the test suite, add the following line to your modules <pre>test</pre> task:
|
||||
* <pre>{@code
|
||||
* environment("test.implementation", "org.example.YourTestSubjectFactory")
|
||||
* }</pre>
|
||||
* Next, in your <pre>test</pre> sources, extend all test classes from the <pre>testFixtures</pre>
|
||||
* <pre>sop.operation</pre> package.
|
||||
* Take a look at the <pre>external-sop</pre> module for an example.
|
||||
*/
|
||||
public abstract class SOPInstanceFactory {
|
||||
|
||||
public abstract Map<String, SOP> provideSOPInstances();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue