Skip to content

Commit

Permalink
#1134 extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jul 15, 2022
1 parent 257bab1 commit 6a94a6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ SOFTWARE.
<properties>
<timestamp>${maven.build.timestamp}</timestamp>
<jdk.version>1.8</jdk.version>
<argLine/>
</properties>
<dependencies>
<!--
Expand All @@ -120,7 +121,7 @@ SOFTWARE.
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<version>1.0.b2</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -335,8 +336,8 @@ SOFTWARE.
<configuration>
<excludedGroups>org.takes.misc.PerformanceTests</excludedGroups>
<systemPropertyVariables>
<argLine>${argLine} -Dfile.encoding=UTF-8</argLine>
<java.awt.headless>true</java.awt.headless>
<file.encoding>UTF-8</file.encoding>
<user.language>en</user.language>
<user.country>US</user.country>
<javax.net.ssl.keyStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.keyStore>
Expand Down
7 changes: 5 additions & 2 deletions src/test/java/org/takes/rs/RsGzipTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ void makesCompressedResponse() throws IOException {
*/
@Test
void makesCompressedPngImage() throws IOException {
final int width = 42;
final int height = 256;
final RenderedImage image = new BufferedImage(
1, 1, BufferedImage.TYPE_INT_ARGB
width, height, BufferedImage.TYPE_INT_ARGB
);
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
ImageIO.write(image, "png", baos);
Expand All @@ -84,7 +86,8 @@ void makesCompressedPngImage() throws IOException {
).body()
)
);
MatcherAssert.assertThat(reverse.getHeight(), Matchers.equalTo(1));
MatcherAssert.assertThat(reverse.getWidth(), Matchers.equalTo(width));
MatcherAssert.assertThat(reverse.getHeight(), Matchers.equalTo(height));
}

/**
Expand Down

0 comments on commit 6a94a6c

Please sign in to comment.