This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push:
new 7f2706c Add messages to JUnit Assert calls.
7f2706c is described below
commit 7f2706ca01767044b4c702f7d75bec487de7b21d
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jan 30 14:27:37 2019 -0500
Add messages to JUnit Assert calls.
---
.../apache/commons/vfs2/test/ProviderRandomSetLengthTests.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderRandomSetLengthTests.java
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderRandomSetLengthTests.java
index 342ec4a..44cbbc1 100644
---
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderRandomSetLengthTests.java
+++
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/test/ProviderRandomSetLengthTests.java
@@ -63,19 +63,19 @@ public class ProviderRandomSetLengthTests extends
AbstractProviderTestCase {
try {
file = this.createScratchFolder().resolveFile("random_write.txt");
file.createFile();
+ final String fileString = file.toString();
final RandomAccessContent ra =
file.getContent().getRandomAccessContent(RandomAccessMode.READWRITE);
- final String raString = ra.toString();
// Write long string
ra.writeBytes(TEST_DATA);
- Assert.assertEquals(raString, TEST_DATA.length(), ra.length());
+ Assert.assertEquals(fileString, TEST_DATA.length(), ra.length());
// Shrink to length 1
ra.setLength(1);
- Assert.assertEquals(raString, 1, ra.length());
+ Assert.assertEquals(fileString, 1, ra.length());
// now read 1
ra.seek(0);
- Assert.assertEquals(raString, ra.readByte(), TEST_DATA.charAt(0));
+ Assert.assertEquals(fileString, ra.readByte(),
TEST_DATA.charAt(0));
try {
ra.readByte();
@@ -86,7 +86,7 @@ public class ProviderRandomSetLengthTests extends
AbstractProviderTestCase {
// Grow to length 2
ra.setLength(2);
- Assert.assertEquals(raString, 2, ra.length());
+ Assert.assertEquals(fileString, 2, ra.length());
// We have an undefined extra byte
ra.seek(1);
ra.readByte();