Project

General

Profile

« Previous | Next » 

Revision 6452

test relationship assertion using obsoletes

View differences:

test/edu/ucsb/nceas/metacat/dataone/CNodeServiceTest.java
220 220
			SystemMetadata sysmeta = createSystemMetadata(guid, session.getSubject(), null);
221 221
			Identifier describePid = new Identifier();
222 222
			describePid.setValue("describePid." + System.currentTimeMillis());
223
			//sysmeta.addDescribe(describePid);
223
			sysmeta.setObsoletes(describePid);
224 224
			// save it
225 225
			Identifier retGuid = CNodeService.getInstance().registerSystemMetadata(session, guid, sysmeta);
226 226
			assertEquals(guid.getValue(), retGuid.getValue());
......
229 229
			Identifier retDescribePid = CNodeService.getInstance().registerSystemMetadata(session, describePid, describeSysmeta);
230 230
			assertEquals(describePid.getValue(), retDescribePid.getValue());
231 231
			// check it
232
			boolean result = CNodeService.getInstance().assertRelation(session, guid, "describes", describePid);
232
			boolean result = CNodeService.getInstance().assertRelation(session, guid, "obsoletes", describePid);
233 233
			assertTrue(result);
234 234
        } catch(Exception e) {
235 235
        	e.printStackTrace();

Also available in: Unified diff