Revision 6322
Added by ben leinfelder over 13 years ago
test/edu/ucsb/nceas/metacat/dataone/CNodeServiceTest.java | ||
---|---|---|
113 | 113 |
suite.addTest(new CNodeServiceTest("testCreate")); |
114 | 114 |
suite.addTest(new CNodeServiceTest("testGet")); |
115 | 115 |
suite.addTest(new CNodeServiceTest("testGetFormat")); |
116 |
//suite.addTest(new CNodeServiceTest("testGetLogRecords"));
|
|
116 |
suite.addTest(new CNodeServiceTest("testGetLogRecords")); |
|
117 | 117 |
suite.addTest(new CNodeServiceTest("testGetSystemMetadata")); |
118 | 118 |
suite.addTest(new CNodeServiceTest("testIsAuthorized")); |
119 | 119 |
suite.addTest(new CNodeServiceTest("testListFormats")); |
... | ... | |
192 | 192 |
Date toDate = new Date(); |
193 | 193 |
Event event = Event.CREATE; |
194 | 194 |
int start = 0; |
195 |
int count = 1000;
|
|
195 |
int count = 1; |
|
196 | 196 |
|
197 | 197 |
Log log = CNodeService.getInstance().getLogRecords(session, fromDate, toDate, |
198 | 198 |
event, start, count); |
199 | 199 |
assertNotNull(log); |
200 |
assertTrue(log.getCount() == 1000);
|
|
201 |
assertTrue(log.getStart() == 0);
|
|
202 |
assertTrue(log.getTotal() > 1);
|
|
200 |
assertTrue(log.getCount() == count);
|
|
201 |
assertTrue(log.getStart() == start);
|
|
202 |
assertTrue(log.getTotal() > 0);
|
|
203 | 203 |
} catch (Exception e) { |
204 | 204 |
e.printStackTrace(); |
205 | 205 |
fail("Unexpected error: " + e.getMessage()); |
Also available in: Unified diff
test for getLogRecords -- with some semi-reasonable expectations on the return that is expected