Revision 12439 trunk/libraries/libGPE/src-test/org/gvsig/xmlschema/writer/WriterBaseTest.java

View differences:

WriterBaseTest.java
1 1
package org.gvsig.xmlschema.writer;
2 2

  
3
import java.io.File;
3 4
import java.io.FileInputStream;
4 5
import java.io.FileOutputStream;
5 6
import java.io.IOException;
......
59 60
 *
60 61
 * $Id$
61 62
 * $Log$
62
 * Revision 1.2  2007-06-22 12:21:18  jorpiell
63
 * Revision 1.3  2007-07-02 09:59:03  jorpiell
64
 * The generated xsd schemas have to be valid
65
 *
66
 * Revision 1.2  2007/06/22 12:21:18  jorpiell
63 67
 * The typeNotFoundException has been deleted. It never was thrown
64 68
 *
65 69
 * Revision 1.1  2007/06/14 16:15:03  jorpiell
......
81 85
 */
82 86
public abstract class WriterBaseTest extends TestCase {
83 87
	private IXSSchema schema = null;
84
	private String fileName = "FILETEMP";
88
	private String fileName = "FILETEMP.xsd";
85 89
	private SchemaDocumentBuilder documentBuilder = null;
86 90
	private DOMObjectsFactory elementsFactory = null;
87 91

  
......
101 105

  
102 106
	public void setUp() throws SchemaCreationException{
103 107
		documentBuilder = SchemaDocumentBuilder.getInstance();
104
		schema = documentBuilder.createXSSchema(getNamespaceURI());	
108
		schema = documentBuilder.createXSSchema(getNamespaceURI(),getNamespacePrefix());	
105 109
		elementsFactory = DOMObjectsFactory.getInstance();
106 110
	}
107 111
	
112
	public void tearDown() throws Exception{
113
		new File(fileName).delete();
114
	}
115
	
108 116
	public void testCompare() throws SchemaWrittingException, ParserConfigurationException, SAXException, IOException, SchemaCreationException{
109 117
		writeSchema();
110 118
		schema.write(new FileOutputStream(fileName));
......
123 131
		return "http://www.gvsig.org/cit";
124 132
	}
125 133
	
134
	/**
135
	 * Gets the namespace prefix
136
	 * @return
137
	 */
138
	public String getNamespacePrefix(){
139
		return "cit";
140
	}
141
	
126 142
	public abstract void writeSchema();
127 143
	
128 144
	public abstract void readSchema();

Also available in: Unified diff