1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.millscript.office.compound.vfs;
22
23 import org.millscript.commons.vfs.AbstractVVolumeTest;
24 import org.millscript.commons.vfs.VFS;
25 import org.millscript.commons.vfs.protocols.file.LocalFile;
26
27 import java.io.File;
28 import java.net.URI;
29
30 /**
31 * @
32 */
33 public class CompoundDocumentVolumeTest extends AbstractVVolumeTest {
34
35 /**
36 * Constructor for ReadOnlyZipVolumeTest.
37 * @param arg0
38 */
39 public CompoundDocumentVolumeTest(String arg0) {
40 super(arg0);
41 }
42
43 /**
44 * @see org.millscript.commons.vfs.AbstractVVolumeTest#getTestURI()
45 */
46 @Override
47 public URI getTestURI() {
48 return new File( "src/test/office/credit_card_tracker_excel5.xls/" ).toURI();
49 }
50
51 /**
52 * @see junit.framework.TestCase#setUp()
53 */
54 @Override
55 protected void setUp() throws Exception {
56 super.setUp();
57 final VFS vfs = new VFS();
58 final LocalFile file = (LocalFile) vfs.resolveAsFile( this.getTestURI() );
59 this.setTestVolume( new CompoundDocumentVolume( file ) );
60 }
61
62 public void testGetURI() {
63
64 assertEquals( this.getTestURI(), this.getTestVolume().getURI() );
65 }
66
67 /**
68 * @see org.millscript.commons.vfs.AbstractVVolumeTest#testToString()
69 */
70 @Override
71 public void testToString() {
72
73
74
75 final StringBuffer expected = new StringBuffer( "VVOLUME( file:" );
76 expected.append( System.getProperty( "user.dir" ) );
77 expected.append( "/src/test/office/credit_card_tracker_excel5.xls )" );
78 assertEquals( expected.toString(), this.getTestVolume().toString() );
79 }
80
81 }