Skip to content

Commit

Permalink
TIKA-1885: Updated test to specify charset in getBytes()
Browse files Browse the repository at this point in the history
  • Loading branch information
dameikle committed May 8, 2016
1 parent 5f0e930 commit eede044
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.IOException;
import java.io.InputStream;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

Expand All @@ -39,14 +40,14 @@ public void setUp() {

@Test
public void testDetectZeroValue() {
byte[] data = "".getBytes();
byte[] data = "".getBytes(UTF_8);
detect(data, MediaType.ZERO_SIZE);
System.out.println();
}

@Test
public void testDetectNonZeroValue() {
byte[] data = "Testing 1...2...3".getBytes();
byte[] data = "Testing 1...2...3".getBytes(UTF_8);
detect(data, MediaType.OCTET_STREAM);
System.out.println();
}
Expand Down

0 comments on commit eede044

Please sign in to comment.