Revision 4150
Added by daigle over 16 years ago
test/edu/ucsb/nceas/metacattest/QuerySpecificationTest.java | ||
---|---|---|
29 | 29 |
import java.io.IOException; |
30 | 30 |
|
31 | 31 |
import junit.framework.Test; |
32 |
import junit.framework.TestCase; |
|
33 | 32 |
import junit.framework.TestSuite; |
34 | 33 |
|
34 |
import edu.ucsb.nceas.MCTestCase; |
|
35 | 35 |
import edu.ucsb.nceas.metacat.QuerySpecification; |
36 | 36 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
37 | 37 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
... | ... | |
42 | 42 |
* |
43 | 43 |
* Test the output of the QuerySpecification class |
44 | 44 |
*/ |
45 |
public class QuerySpecificationTest extends TestCase |
|
45 |
public class QuerySpecificationTest extends MCTestCase
|
|
46 | 46 |
{ |
47 | 47 |
/** A test query document in xml format */ |
48 | 48 |
private FileReader xml; |
... | ... | |
149 | 149 |
System.out.println("---- SQL ------------------"); |
150 | 150 |
QuerySpecification qspec = new QuerySpecification(xml, |
151 | 151 |
PropertyService.getProperty("saxparser"), |
152 |
PropertyService.getProperty("accNumberSeparator"));
|
|
152 |
PropertyService.getProperty("accNumSeparator")); |
|
153 | 153 |
String query = qspec.printSQL(false); |
154 | 154 |
assertTrue(selectionQuery.equals(query.trim())); |
155 | 155 |
} catch (IOException e) { |
... | ... | |
168 | 168 |
System.out.println("---- orginal EXT SQL ------------------\n"+extendedQuery); |
169 | 169 |
QuerySpecification qspec = new QuerySpecification(xml, |
170 | 170 |
PropertyService.getProperty("saxparser"), |
171 |
PropertyService.getProperty("accNumberSeparator"));
|
|
171 |
PropertyService.getProperty("accNumSeparator")); |
|
172 | 172 |
String query = |
173 | 173 |
qspec.printExtendedSQL( |
174 | 174 |
"'obfs.45337', 'obfs.45338', 'obfs.45346'", true); |
Also available in: Unified diff
Extend TestCase. Fix accountnum property getter.