Project

General

Profile

Download (1.83 KB) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2007 EDIT
4
* European Distributed Institute of Taxonomy 
5
* http://www.e-taxonomy.eu
6
* 
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10

    
11
package eu.etaxonomy.cdm.print;
12

    
13
import java.io.File;
14
import java.util.Arrays;
15

    
16
import org.apache.log4j.Logger;
17
import org.jdom.Element;
18
import org.junit.BeforeClass;
19
import org.junit.Ignore;
20
import org.junit.Test;
21

    
22
import eu.etaxonomy.cdm.print.out.IPublishOutputModule;
23
import eu.etaxonomy.cdm.print.out.odf.OdfOutputModule;
24
import eu.etaxonomy.cdm.print.out.xml.XMLOutputModule;
25

    
26
/**
27
 * @author n.hoffmann
28
 * @created Apr 9, 2010
29
 * @version 1.0
30
 */
31
@Ignore // Implement this test in a more generic way
32
public class PublisherTest {
33
	private static final Logger logger = Logger.getLogger(PublisherTest.class);
34

    
35
	private static PublishConfigurator configurator; 
36
	
37
	private static Publisher publisher;
38
	
39
	/**
40
	 * @throws java.lang.Exception
41
	 */
42
	@BeforeClass
43
	public static void setUpBeforeClass() throws Exception {
44
		
45
		configurator = PublishConfigurator.NewRemoteInstance();
46
		
47
		configurator.setWebserviceUrl("http://localhost:8080/");
48
		
49
//		Element selectedTaxonNodeElement = new Element("TaxonNode");
50
//		
51
//		configurator.addSelectedTaxonNodeElements(selectedTaxonNodeElement);
52
		
53
		configurator.setExportFolder(new File("/Users/nho/tmp/"));
54
		
55
		
56
	}
57

    
58
	/**
59
	 * Test method for {@link eu.etaxonomy.cdm.print.Publisher#publish()}.
60
	 */
61
	@Test
62
	public void testPublishXml() {
63
		configurator.setOutputModules(Arrays.asList(new IPublishOutputModule[]{new XMLOutputModule()}));
64
		
65
		Publisher.publish(configurator);
66
	}
67
	
68
	@Test
69
	public void textPublishOdf() {
70
		configurator.setOutputModules(Arrays.asList(new IPublishOutputModule[]{new OdfOutputModule()}));
71
		
72
		Publisher.publish(configurator);
73
	}
74
}
(1-1/2)