-
-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
76 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/test/java/tools/jackson/core/testsupport/TestSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package tools.jackson.core.testsupport; | ||
|
||
import tools.jackson.core.*; | ||
import tools.jackson.core.io.ContentReference; | ||
import tools.jackson.core.io.IOContext; | ||
import tools.jackson.core.util.BufferRecycler; | ||
|
||
/** | ||
* Container for various factories needed by (unit) tests. | ||
* | ||
* @since 2.16 | ||
*/ | ||
public class TestSupport | ||
{ | ||
/** | ||
* Factory method for creating {@link IOContext}s for tests | ||
*/ | ||
public static IOContext testIOContext() { | ||
return new IOContext(StreamReadConstraints.defaults(), StreamWriteConstraints.defaults(), | ||
ErrorReportConfiguration.defaults(), | ||
new BufferRecycler(), ContentReference.unknown(), false, | ||
JsonEncoding.UTF8); | ||
} | ||
|
||
/** | ||
* Factory method for creating {@link IOContext}s for tests | ||
*/ | ||
public static IOContext testIOContext(StreamWriteConstraints swc) { | ||
return new IOContext(StreamReadConstraints.defaults(), swc, | ||
ErrorReportConfiguration.defaults(), | ||
new BufferRecycler(), ContentReference.unknown(), false, | ||
JsonEncoding.UTF8); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters