Project

General

Profile

1
/**  '$RCSfile$'
2
 *  Copyright: 2010 Regents of the University of California and the
3
 *              National Center for Ecological Analysis and Synthesis
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation; either version 2 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
19
package edu.ucsb.nceas.metacat.annotation;
20

    
21
import junit.framework.Test;
22
import junit.framework.TestSuite;
23
import edu.ucsb.nceas.MCTestCase;
24

    
25
public class OrcidServiceTest extends MCTestCase {
26

    
27
	
28
	/**
29
	 * constructor for the test
30
	 */
31
	public OrcidServiceTest(String name) {
32
		super(name);
33
	}
34

    
35
	/**
36
	 * Establish a testing framework by initializing appropriate objects
37
	 */
38
	public void setUp() throws Exception {
39
		super.setUp();
40
	}
41

    
42
	/**
43
	 * Release any objects after tests are complete
44
	 */
45
	public void tearDown() {
46
	}
47

    
48
	/**
49
	 * Create a suite of tests to be run together
50
	 */
51
	public static Test suite() {
52
		TestSuite suite = new TestSuite();
53
		suite.addTest(new OrcidServiceTest("testLookup"));
54
		return suite;
55
	}
56
	
57
	public void testLookup() {
58
		String[] otherNames = new String[] {"Matthew Jones"};
59
		String orcid = OrcidService.lookupOrcid(null, null, otherNames);
60
		assertEquals("http://sandbox-1.orcid.org/0000-0003-2141-4459", orcid);
61
	}
62

    
63
}
(3-3/3)