ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/owl/trunk/tools/MultiOutputStreamTest.java
Revision: 492
Committed: Wed Jan 2 13:18:57 2008 UTC (16 years, 10 months ago) by duarte
File size: 1075 byte(s)
Log Message:
Copied the aglappe-jung branch into trunk.

Line File contents
1 package tools;
2
3 import junit.framework.TestCase;
4
5 import java.io.OutputStream;
6 import java.io.FileOutputStream;
7 import java.io.FileNotFoundException;
8 import java.io.PrintWriter;
9
10 public class MultiOutputStreamTest extends TestCase {
11
12 /*
13 * Test method for 'tools.MultiOutputStream'
14 */
15 public void testMultiOutputStream() throws FileNotFoundException {
16
17 final String url1 = "http://gelb:9123";
18 final String url2 = "http://gelb:9124";
19 final String url3 = "http://gelb:9125";
20 final String file1 = "/home/stehr/test.log";
21 final String command1 = "load /project/StruPPi/PDBs/mainPDB/1RX4.pdb, hello";
22 final String command2 = "rock";
23
24 OutputStream os1 = new PymolServerOutputStream(url1);
25 OutputStream os2 = new PymolServerOutputStream(url2);
26 OutputStream os3 = new PymolServerOutputStream(url3);
27 OutputStream os4 = new FileOutputStream(file1);
28 OutputStream multi = new MultiOutputStream(os1, os2, os3, os4);
29 PrintWriter multiOut = new PrintWriter(multi, true);
30 multiOut.println(command1);
31 multiOut.println(command2);
32 }
33 }