Revision 4145
Added by daigle over 16 years ago
test/edu/ucsb/nceas/metacatnettest/MetaCatServletNetTest.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
package edu.ucsb.nceas.metacatnettest; |
28 | 28 |
|
29 |
import edu.ucsb.nceas.MCTestCase; |
|
29 | 30 |
import edu.ucsb.nceas.metacat.*; |
30 | 31 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
31 | 32 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
32 |
import edu.ucsb.nceas.morpho.framework.*; |
|
33 |
|
|
33 | 34 |
import junit.framework.Test; |
34 |
import junit.framework.TestCase; |
|
35 |
import junit.framework.TestResult; |
|
36 | 35 |
import junit.framework.TestSuite; |
37 | 36 |
|
38 | 37 |
import java.io.*; |
... | ... | |
44 | 43 |
/** |
45 | 44 |
* A JUnit test for testing Step class processing |
46 | 45 |
*/ |
47 |
public class MetaCatServletNetTest extends TestCase { |
|
46 |
public class MetaCatServletNetTest extends MCTestCase {
|
|
48 | 47 |
private static String metacatURL; |
49 | 48 |
static { |
50 | 49 |
try { |
51 |
PropertyService.getInstance("build/tests"); |
|
52 | 50 |
metacatURL = PropertyService.getProperty("test.metacat.url"); |
53 | 51 |
} catch (PropertyNotFoundException pnfe) { |
54 | 52 |
System.err.println("could not find metacat URL in MetacatServletNetTest: " |
test/edu/ucsb/nceas/metacattest/OnlineDataAccessTest.java | ||
---|---|---|
33 | 33 |
import java.util.SimpleTimeZone; |
34 | 34 |
import java.util.TimeZone; |
35 | 35 |
|
36 |
import edu.ucsb.nceas.MCTestCase; |
|
36 | 37 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
37 | 38 |
import edu.ucsb.nceas.metacat.client.Metacat; |
38 | 39 |
import edu.ucsb.nceas.metacat.client.MetacatAuthException; |
... | ... | |
40 | 41 |
import edu.ucsb.nceas.metacat.client.MetacatFactory; |
41 | 42 |
import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException; |
42 | 43 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
43 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
|
44 | 44 |
import edu.ucsb.nceas.utilities.IOUtil; |
45 | 45 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
46 | 46 |
import junit.framework.Test; |
47 |
import junit.framework.TestCase; |
|
48 | 47 |
import junit.framework.TestSuite; |
49 | 48 |
import java.io.File; |
50 | 49 |
|
... | ... | |
52 | 51 |
* A JUnit test for testing Access Control for online data in Metacat |
53 | 52 |
*/ |
54 | 53 |
public class OnlineDataAccessTest |
55 |
extends TestCase { |
|
54 |
extends MCTestCase {
|
|
56 | 55 |
|
57 | 56 |
private static String metacatUrl; |
58 | 57 |
private static String username; |
... | ... | |
61 | 60 |
private static String anotherpassword; |
62 | 61 |
static { |
63 | 62 |
try { |
64 |
metacatUrl = SystemUtil.getServletURL();
|
|
63 |
metacatUrl = PropertyService.getProperty("test.metacat.url");
|
|
65 | 64 |
username = PropertyService.getProperty("test.mcuser"); |
66 | 65 |
password = PropertyService.getProperty("test.mcpassword"); |
67 | 66 |
anotheruser = PropertyService.getProperty("test.mcanotheruser"); |
test/edu/ucsb/nceas/metacattest/NonAsciiCharacterTest.java | ||
---|---|---|
33 | 33 |
import java.util.SimpleTimeZone; |
34 | 34 |
import java.util.TimeZone; |
35 | 35 |
|
36 |
import edu.ucsb.nceas.MCTestCase; |
|
36 | 37 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
37 | 38 |
import edu.ucsb.nceas.metacat.client.Metacat; |
38 | 39 |
import edu.ucsb.nceas.metacat.client.MetacatAuthException; |
... | ... | |
40 | 41 |
import edu.ucsb.nceas.metacat.client.MetacatFactory; |
41 | 42 |
import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException; |
42 | 43 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
43 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
|
44 | 44 |
import edu.ucsb.nceas.utilities.IOUtil; |
45 | 45 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
46 | 46 |
import junit.framework.Test; |
47 |
import junit.framework.TestCase; |
|
48 | 47 |
import junit.framework.TestSuite; |
49 | 48 |
import java.io.File; |
50 | 49 |
|
... | ... | |
52 | 51 |
* A JUnit test for testing Metacat when Non Ascii Characters are inserted |
53 | 52 |
*/ |
54 | 53 |
public class NonAsciiCharacterTest |
55 |
extends TestCase { |
|
54 |
extends MCTestCase {
|
|
56 | 55 |
|
57 | 56 |
private static String metacatUrl; |
58 | 57 |
private static String username; |
... | ... | |
61 | 60 |
private static String anotherpassword; |
62 | 61 |
static { |
63 | 62 |
try { |
64 |
metacatUrl = SystemUtil.getServletURL();
|
|
63 |
metacatUrl = PropertyService.getProperty("test.metacat.url");
|
|
65 | 64 |
username = PropertyService.getProperty("test.mcuser"); |
66 | 65 |
password = PropertyService.getProperty("test.mcpassword"); |
67 | 66 |
anotheruser = PropertyService.getProperty("test.mcanotheruser"); |
test/edu/ucsb/nceas/metacattest/InlineDataAccessTest.java | ||
---|---|---|
33 | 33 |
import java.util.SimpleTimeZone; |
34 | 34 |
import java.util.TimeZone; |
35 | 35 |
|
36 |
import edu.ucsb.nceas.MCTestCase; |
|
36 | 37 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
37 | 38 |
import edu.ucsb.nceas.metacat.client.Metacat; |
38 | 39 |
import edu.ucsb.nceas.metacat.client.MetacatAuthException; |
... | ... | |
40 | 41 |
import edu.ucsb.nceas.metacat.client.MetacatFactory; |
41 | 42 |
import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException; |
42 | 43 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
43 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
|
44 | 44 |
import edu.ucsb.nceas.utilities.IOUtil; |
45 | 45 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
46 | 46 |
import junit.framework.Test; |
47 |
import junit.framework.TestCase; |
|
48 | 47 |
import junit.framework.TestSuite; |
49 | 48 |
import java.io.File; |
50 | 49 |
|
... | ... | |
52 | 51 |
* A JUnit test for testing Access Control for Inline data in Metacat |
53 | 52 |
*/ |
54 | 53 |
public class InlineDataAccessTest |
55 |
extends TestCase { |
|
54 |
extends MCTestCase {
|
|
56 | 55 |
|
57 | 56 |
private static String metacatUrl; |
58 | 57 |
private static String username; |
... | ... | |
61 | 60 |
private static String anotherpassword; |
62 | 61 |
static { |
63 | 62 |
try { |
64 |
metacatUrl = SystemUtil.getServletURL();
|
|
63 |
metacatUrl = PropertyService.getProperty("test.metacat.url");
|
|
65 | 64 |
username = PropertyService.getProperty("test.mcuser"); |
66 | 65 |
password = PropertyService.getProperty("test.mcpassword"); |
67 | 66 |
anotheruser = PropertyService.getProperty("test.mcanotheruser"); |
test/edu/ucsb/nceas/metacattest/client/MetacatClientTest.java | ||
---|---|---|
38 | 38 |
import java.util.SimpleTimeZone; |
39 | 39 |
import java.util.TimeZone; |
40 | 40 |
|
41 |
import edu.ucsb.nceas.MCTestCase; |
|
41 | 42 |
import edu.ucsb.nceas.metacat.DocumentImpl; |
42 | 43 |
import edu.ucsb.nceas.metacat.client.DocumentNotFoundException; |
43 | 44 |
import edu.ucsb.nceas.metacat.client.InsufficientKarmaException; |
... | ... | |
47 | 48 |
import edu.ucsb.nceas.metacat.client.MetacatFactory; |
48 | 49 |
import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException; |
49 | 50 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
50 |
import edu.ucsb.nceas.metacat.util.MetaCatUtil; |
|
51 |
import edu.ucsb.nceas.metacat.util.SystemUtil; |
|
52 | 51 |
import edu.ucsb.nceas.utilities.IOUtil; |
53 | 52 |
import edu.ucsb.nceas.utilities.PropertyNotFoundException; |
54 | 53 |
import junit.framework.Test; |
55 |
import junit.framework.TestCase; |
|
56 | 54 |
import junit.framework.TestSuite; |
57 | 55 |
import java.io.FileInputStream; |
58 | 56 |
|
... | ... | |
61 | 59 |
/** |
62 | 60 |
* A JUnit test for testing Step class processing |
63 | 61 |
*/ |
64 |
public class MetacatClientTest extends TestCase |
|
62 |
public class MetacatClientTest extends MCTestCase
|
|
65 | 63 |
{ |
66 | 64 |
|
67 | 65 |
private String wrongMetacatUrl= |
Also available in: Unified diff
Extend MCTestCase to handle initialization of PropertyService