use of cz.mzk.recordmanager.server.dc.DublinCoreRecordImpl in project RecordManager2 by moravianlibrary.
the class IdentifiersDublinCoreRecordFunctionsTest method getISBNs.
@Test
public void getISBNs() {
DublinCoreRecord record = new DublinCoreRecordImpl();
record.addIdentifier("ISBN:0385424728");
DublinCoreFunctionContext dcContext = new DublinCoreFunctionContext(record);
List<String> isbns = functions.getISBNs(dcContext);
Assert.assertFalse(isbns.isEmpty());
Assert.assertEquals(isbns.get(0), "0385424728");
}
use of cz.mzk.recordmanager.server.dc.DublinCoreRecordImpl in project RecordManager2 by moravianlibrary.
the class DublinCoreScriptFactoryTest method test.
@Test
public void test() {
InputStream is1 = getClass().getResourceAsStream("/groovy/BaseDublinCore.groovy");
MappingScript<DublinCoreFunctionContext> script = factory.create(is1);
DublinCoreRecord record = new DublinCoreRecordImpl();
record.addTitle("test");
DublinCoreFunctionContext dcContext = new DublinCoreFunctionContext(record);
Map<String, Object> entries = script.parse(dcContext);
Assert.assertEquals(entries.size(), 1);
Assert.assertEquals(entries.get("title"), "test");
}
Aggregations