Revision 6385
Added by Chris Jones about 13 years ago
test/edu/ucsb/nceas/metacat/dataone/MNodeServiceTest.java | ||
---|---|---|
509 | 509 |
Identifier pid = MNodeService.getInstance().create(session, guid, object, sysmeta); |
510 | 510 |
DescribeResponse describeResponse = MNodeService.getInstance().describe(session, pid); |
511 | 511 |
assertEquals(describeResponse.getDataONE_Checksum().getValue(), sysmeta.getChecksum().getValue()); |
512 |
assertEquals(describeResponse.getDataONE_ObjectFormat().getFormatName(), sysmeta.getObjectFormat().getFormatName());
|
|
512 |
assertEquals(describeResponse.getDataONE_ObjectFormatIdentifier(), sysmeta.getFmtid());
|
|
513 | 513 |
|
514 | 514 |
} catch (UnsupportedEncodingException e) { |
515 | 515 |
e.printStackTrace(); |
test/edu/ucsb/nceas/metacat/dataone/D1NodeServiceTest.java | ||
---|---|---|
31 | 31 |
import java.io.InputStream; |
32 | 32 |
import java.io.InputStreamReader; |
33 | 33 |
import java.io.Reader; |
34 |
import java.math.BigInteger; |
|
34 | 35 |
import java.security.MessageDigest; |
35 | 36 |
import java.security.NoSuchAlgorithmException; |
36 | 37 |
import java.util.Date; |
... | ... | |
147 | 148 |
SystemMetadata sm = new SystemMetadata(); |
148 | 149 |
// set the id |
149 | 150 |
sm.setIdentifier(id); |
150 |
sm.setObjectFormat(ObjectFormatCache.getInstance().getFormat("application/octet-stream"));
|
|
151 |
sm.setFmtid(ObjectFormatCache.getInstance().getFormat("application/octet-stream").getFmtid());
|
|
151 | 152 |
// create the checksum |
152 | 153 |
String checksumS = "test"; |
153 | 154 |
if (object != null) { |
... | ... | |
159 | 160 |
checksum.setAlgorithm(ca); |
160 | 161 |
sm.setChecksum(checksum); |
161 | 162 |
// set the size |
162 |
sm.setSize(0);
|
|
163 |
sm.setSize(new BigInteger("0"));
|
|
163 | 164 |
sm.setSubmitter(owner); |
164 | 165 |
sm.setRightsHolder(owner); |
165 | 166 |
sm.setDateUploaded(new Date()); |
test/edu/ucsb/nceas/metacat/restservice/ResourceHandlerTest.java | ||
---|---|---|
41 | 41 |
import org.dataone.service.exceptions.BaseException; |
42 | 42 |
import org.dataone.service.exceptions.InvalidSystemMetadata; |
43 | 43 |
import org.dataone.service.exceptions.ServiceFailure; |
44 |
import org.dataone.service.types.SystemMetadata; |
|
44 |
import org.dataone.service.types.v1.SystemMetadata;
|
|
45 | 45 |
import org.jibx.runtime.BindingDirectory; |
46 | 46 |
import org.jibx.runtime.IBindingFactory; |
47 | 47 |
import org.jibx.runtime.IMarshallingContext; |
Also available in: Unified diff
Update tests to use the DataONE 0.6.4 schema and types.