Commit Graph

43 Commits

Author SHA1 Message Date
Vyshak Puthusseri
543acce8a3 Upgrade to Junit5 (#1050)
* chore: Update to junit5 for servlet package

* chore: Update to junit5 for contrib package

* chore: Update to junit5 for common-image package

* chore: Update to junit5 for common-lang package

* chore: Update to junit5 for entire project files

* fix: test case for JPEGImageReaderTest failed for java 8 and 11

assertEquals was using old signature of junit4.

* Update common/common-io/src/test/java/com/twelvemonkeys/io/InputStreamAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update common/common-io/src/test/java/com/twelvemonkeys/io/InputStreamAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-bmp/src/test/java/com/twelvemonkeys/imageio/plugins/bmp/BMPImageReaderTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-jpeg/src/test/java/com/twelvemonkeys/imageio/plugins/jpeg/JPEGImageReaderTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageMetadataTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageReaderTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-tiff/src/test/java/com/twelvemonkeys/imageio/plugins/tiff/TIFFImageWriterTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/stream/BufferedChannelImageInputStreamTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/stream/BufferedChannelImageInputStreamTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* refactor: few indentation changes and missed test case

- review change related to missing test annotation
- unwanted new lines inside test case
- duplicate assertions

* refactor: moved the lambda expression to method reference

* review: testNotNullWithParameterNull catch block was never executed.

Added the suggested change

* Apply suggestions from code review

chore: adjust suggested indentation

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageReaderAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageReaderAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* Update imageio/imageio-core/src/test/java/com/twelvemonkeys/imageio/util/ImageWriterAbstractTest.java

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>

* refactor: using assertTimeout doesnot kill the execution, even if the timeout happens.

It is better to use assertTimeoutPreemptively in cases, where we really want to kill the execution after timeout.
https://stackoverflow.com/questions/57116801/how-to-fail-a-test-after-a-timeout-is-exceeded-in-junit-5/57116959#57116959

---------

Co-authored-by: Harald Kuhr <harald.kuhr@gmail.com>
2024-11-12 10:13:15 +01:00
Harald Kuhr
c22ada03cd Replace some usages of ImageTypeSpecifier.createFromRenderedImage. 2023-10-05 20:09:37 +02:00
Harald Kuhr
aab2d36e92 Prepare for new Batik version 2023-08-23 12:41:54 +02:00
Harald Kuhr
4170b393fa #684 Add some tolerance for JDK 8... 2022-06-10 17:48:20 +02:00
Harald Kuhr
53f9ba91e0 #684 Remove TODO as it's now fixed 2022-06-10 17:44:53 +02:00
Harald Kuhr
be2d7d5f10 #684 Fix some render size issues in SVGImageReader
Bonus: Minor code clean-up.
2022-06-10 17:24:47 +02:00
Harald Kuhr
00aec2c90e Minor code clean-up for WMFImageReader 2022-06-10 17:01:55 +02:00
Gauthier
5617b4323c Make tests pass on JDK 16 and 17 (#635)
* make tests pass on JDK 16 and 17
replace deprecated mockito-all by mockito-core, and updated to latest 3.x
replace deprecated org.mockito.Matchers

* code cleanup from IDE suggestions

* add oracle jdk 16 and 17 to Travis
2021-10-26 18:38:33 +02:00
Harald Kuhr
564778f415 #616: Remove dependency on old xmlgraphics-commons (no longer needed) 2021-08-04 11:25:58 +02:00
Oliver Schmidtmer
96223f9f9f Allow embedded resource URLs if external resources are disabled 2021-03-26 16:05:21 +01:00
Harald Kuhr
9fdbc3b1fc ImageReaderAbstractTest refactorings. 2020-10-14 17:06:35 +02:00
Ashish Chopra
6642b1647a #526 Incorporating review comments
* moved the system-property-evaluation to static-block for more
  reliability
* updated impacted existing tests (which relied on external-resources) to
  leverage the new API
* set the value of system-property controlling external-resource-access
  to true in the test JVM for the sake of existing tests using
  SVGImageReader APIs not backed by SVRReadParams (.getWidth/.getHeight
  and such)
2020-03-30 18:29:34 +05:30
Ashish Chopra
5315caf830 #526 Fixed unnecessary 'overenginnering' in previous commit 🤦 2020-03-30 10:38:52 +05:30
Ashish Chopra
872523b0f0 #526 Incorporating review comments
* renaming accessors
* changing the default to disallow external resources
* introduced system-property for backwards compatibility
* honor system-property (if present) and SVGReadParams.isAllowExternalResources hasn't been called
  (as against ignoring system-property and reverting to 'block-by-default' if SVGReadParams.isAllowExternalResources invoked)
* added + updated test cases
2020-03-24 18:40:01 +05:30
Ashish Chopra
7bf99fb496 #526 Preventing SSRF due to external resource refs in SVGs 2020-02-25 11:26:16 +05:30
Oliver Schmidtmer
e956176872 #518 Fallbacks for aspect ratio, if only one dimension is given 2020-01-30 18:40:11 +01:00
Oliver Schmidtmer
6d2947b080 #518 Parsing SVG width/height attributes 2020-01-30 15:54:59 +01:00
Oliver Schmidtmer
810b7197ab Test correction for ViewBox based svg sizes 2019-08-22 16:51:34 +02:00
Oliver Schmidtmer
24a0786d64 When rescaling SVGs use the ViewBox, if defined, for default sizes 2019-08-22 16:35:40 +02:00
Harald Kuhr
9e23413456 Fixed JavaDoc errors to enable Java 8 build. 2019-08-10 00:41:36 +02:00
Harald Kuhr
cc5af0134c #442 SVG BaseURI issue fix 2018-10-11 21:38:10 +02:00
Harald Kuhr
24c6682236 #311 Updated license headers to be the same as in the LICENSE.txt 2018-08-18 19:22:52 +02:00
Harald Kuhr
0c66ad82dd #405 SVG OSGi issue 2018-03-07 09:31:35 +01:00
Harald Kuhr
ab13084f44 #292 Preparing for Java 9 compatibility + general clean-up 2016-11-15 21:40:59 +01:00
Harald Kuhr
34eb084d24 #212 TIFF subsampling fix 2016-11-02 19:06:12 +01:00
Harald Kuhr
44401d9a0d #275 Fix infinite loop if EOF before header done 2016-08-08 11:27:12 +02:00
Harald Kuhr
e9388e55ec #260 ProviderInfo fix 2016-06-02 11:24:57 +02:00
Harald Kuhr
4e765fa61d #190 Updating to Batik 1.8 fixes incorrect size for WMF files. 2015-11-13 13:45:12 +01:00
Harald Kuhr
fd73ae09bd #191 Support for SVG files without XML declaration 2015-11-13 13:39:04 +01:00
Harald Kuhr
f6847e39c8 #190 Updated for Batik 1.8 2015-11-13 13:36:34 +01:00
Harald Kuhr
e603ae260d TMI-64: Test case clean-up 2015-04-10 11:06:50 +02:00
Harald Kuhr
2c90bcc49c Added license to ProviderInfo classes + minor code clean up. 2015-04-07 11:23:14 +02:00
Harald Kuhr
2c8f0f5add TMI-125: Clean up after merge + fix Spi issue. 2015-04-07 11:05:14 +02:00
Tyler
9c3cff04e4 Encountered issue where an SVGImageReader instance that was used to read
multiple SVG images was only returning the first image. This commit
includes a test case and a proposed fix.
2015-04-01 14:31:12 -07:00
Harald Kuhr
8c93be05a5 Better testing of source region reading. A few readers are failing for now, added @Ignore. 2014-09-26 15:59:19 +02:00
Harald Kuhr
38fa2189bc TMI-IIO: Removed some deprecation warnings. 2013-11-05 20:24:12 +01:00
Harald Kuhr
f5a4fe03f4 TMI-15: Fixed some issues introduced in later JREs (at least 7u45). 2013-11-05 09:43:46 +01:00
Harald Kuhr
98361194ea TMI-TIFF: Initial commit. Major work in progress. :-) 2012-05-22 00:00:11 +02:00
Harald Kuhr
0c4fc454b9 Major test-case cleanup.
- Removed JMock dependency, tests rewritten to use Mockito for stub/mock
- All test should now be using JUnit annotation-style tests
- All modules should now depend on same JUnit version
- Rewrote a few tests to better utilize JUnit annotations
- Fixed a few broken tests
- Code style changes
2011-12-19 14:28:34 +01:00
Harald Kuhr
87118aecee New code style. No functional changes. 2011-02-17 17:58:55 +01:00
Harald Kuhr
770f948e1a New code style. No functional changes. 2011-02-17 17:54:50 +01:00
Harald Kuhr
20b87d155d Mainly new code standard.
A few changes that should have been committed earlier.. :-/
2011-02-17 12:40:49 +01:00
Erlend Hamnaberg
0786949c1c It all works 2009-11-08 19:52:30 +01:00