Revision a8707b3d
Added by Andreas Kohlbecker over 13 years ago
cdmlib-print/src/test/java/eu/etaxonomy/cdm/print/out/pdf/PdfOutputModuleTest.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
32 | 32 |
*/ |
33 | 33 |
public class PdfOutputModuleTest { |
34 | 34 |
|
35 |
|
|
35 |
|
|
36 | 36 |
/** |
37 |
* @throws IOException
|
|
38 |
*
|
|
37 |
* @throws IOException |
|
38 |
* |
|
39 | 39 |
*/ |
40 | 40 |
@Test |
41 | 41 |
public void testGetXslt() throws IOException { |
42 | 42 |
PdfOutputModule outputModule = new PdfOutputModule(); |
43 |
|
|
43 |
|
|
44 | 44 |
InputStream xslt = outputModule.getXsltInputStream(); |
45 |
|
|
45 |
|
|
46 | 46 |
assertNotNull(xslt); |
47 | 47 |
assertTrue(xslt.available() > 0); |
48 | 48 |
} |
49 |
|
|
49 |
|
|
50 | 50 |
@Test |
51 | 51 |
public void testGetStylesheetByLocation() throws IOException { |
52 | 52 |
PdfOutputModule outputModule = new PdfOutputModule(); |
53 |
|
|
54 |
URL shippedStylesheetsResource = AbstractPublishOutputModule.class.getResource("/stylesheets/pdf/");
|
|
53 |
|
|
54 |
URL shippedStylesheetsResource = AbstractPublishOutputModule.class.getResource("/stylesheets/pdf/"); |
|
55 | 55 |
File shippedStylesheetsDir = new File(shippedStylesheetsResource.getFile()); |
56 |
|
|
56 |
System.out.println("########" + shippedStylesheetsResource); |
|
57 | 57 |
List<File> stylesheets = outputModule.getStylesheetsByLocation(shippedStylesheetsDir); |
58 |
|
|
58 |
|
|
59 | 59 |
assertNotNull("There should be stylesheets", stylesheets); |
60 | 60 |
assertEquals("There should be two stylesheets", 2, stylesheets.size()); |
61 | 61 |
} |
62 |
|
|
63 |
|
|
62 |
|
|
63 |
|
|
64 | 64 |
} |
Also available in: Unified diff
test