Skip to content

Commit 6a94a6c

Browse files
committed
#1134 extra test
1 parent 257bab1 commit 6a94a6c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ SOFTWARE.
9696
<properties>
9797
<timestamp>${maven.build.timestamp}</timestamp>
9898
<jdk.version>1.8</jdk.version>
99+
<argLine/>
99100
</properties>
100101
<dependencies>
101102
<!--
@@ -120,7 +121,7 @@ SOFTWARE.
120121
<dependency>
121122
<groupId>xml-apis</groupId>
122123
<artifactId>xml-apis</artifactId>
123-
<version>2.0.2</version>
124+
<version>1.0.b2</version>
124125
<scope>provided</scope>
125126
</dependency>
126127
<dependency>
@@ -335,8 +336,8 @@ SOFTWARE.
335336
<configuration>
336337
<excludedGroups>org.takes.misc.PerformanceTests</excludedGroups>
337338
<systemPropertyVariables>
339+
<argLine>${argLine} -Dfile.encoding=UTF-8</argLine>
338340
<java.awt.headless>true</java.awt.headless>
339-
<file.encoding>UTF-8</file.encoding>
340341
<user.language>en</user.language>
341342
<user.country>US</user.country>
342343
<javax.net.ssl.keyStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.keyStore>

src/test/java/org/takes/rs/RsGzipTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ void makesCompressedResponse() throws IOException {
7070
*/
7171
@Test
7272
void makesCompressedPngImage() throws IOException {
73+
final int width = 42;
74+
final int height = 256;
7375
final RenderedImage image = new BufferedImage(
74-
1, 1, BufferedImage.TYPE_INT_ARGB
76+
width, height, BufferedImage.TYPE_INT_ARGB
7577
);
7678
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
7779
ImageIO.write(image, "png", baos);
@@ -84,7 +86,8 @@ void makesCompressedPngImage() throws IOException {
8486
).body()
8587
)
8688
);
87-
MatcherAssert.assertThat(reverse.getHeight(), Matchers.equalTo(1));
89+
MatcherAssert.assertThat(reverse.getWidth(), Matchers.equalTo(width));
90+
MatcherAssert.assertThat(reverse.getHeight(), Matchers.equalTo(height));
8891
}
8992

9093
/**

0 commit comments

Comments
 (0)