Revision 9104
Added by Jing Tao almost 10 years ago
test/edu/ucsb/nceas/metacat/dataone/D1NodeServiceTest.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
package edu.ucsb.nceas.metacat.dataone; |
27 | 27 |
|
28 |
import java.io.IOException; |
|
28 | 29 |
import java.io.InputStream; |
29 | 30 |
import java.io.InputStreamReader; |
30 | 31 |
import java.io.Reader; |
... | ... | |
84 | 85 |
NodeLocator nodeLocator = new NodeLocator() { |
85 | 86 |
@Override |
86 | 87 |
public D1Node getCNode() throws ClientSideException { |
87 |
return new MockCNode(); |
|
88 |
D1Node node = null; |
|
89 |
try { |
|
90 |
node = new MockCNode(); |
|
91 |
} catch (IOException e) { |
|
92 |
throw new ClientSideException(e.getMessage()); |
|
93 |
} |
|
94 |
return node; |
|
88 | 95 |
} |
89 | 96 |
}; |
90 | 97 |
D1Client.setNodeLocator(nodeLocator ); |
Also available in: Unified diff
Handle the IOException which was added to MockCNode constructor.