Search in sources :

Example 16 with MarcFunctionContext

use of cz.mzk.recordmanager.server.scripting.marc.MarcFunctionContext in project RecordManager2 by moravianlibrary.

the class MzkFormatFunctionsTest method photographyFormat2.

public void photographyFormat2() throws Exception {
    List<String> data = new ArrayList<String>();
    data.add("072 $afotografie $xfd132277");
    String format = formatFunctions.getMZKFormat(new MarcFunctionContext(MarcRecordFactory.recordFactory(data)));
    Assert.assertEquals(format, "Photography");
}
Also used : ArrayList(java.util.ArrayList) MarcFunctionContext(cz.mzk.recordmanager.server.scripting.marc.MarcFunctionContext)

Example 17 with MarcFunctionContext

use of cz.mzk.recordmanager.server.scripting.marc.MarcFunctionContext in project RecordManager2 by moravianlibrary.

the class MzkFormatFunctionsTest method normFormat.

public void normFormat() throws Exception {
    List<String> data = new ArrayList<String>();
    data.add("991 $n norma a patenty");
    String format = formatFunctions.getMZKFormat(new MarcFunctionContext(MarcRecordFactory.recordFactory(data)));
    Assert.assertEquals(format, "Norm");
}
Also used : ArrayList(java.util.ArrayList) MarcFunctionContext(cz.mzk.recordmanager.server.scripting.marc.MarcFunctionContext)

Aggregations

MarcFunctionContext (cz.mzk.recordmanager.server.scripting.marc.MarcFunctionContext)17 ArrayList (java.util.ArrayList)13 MarcRecord (cz.mzk.recordmanager.server.marc.MarcRecord)9 AbstractTest (cz.mzk.recordmanager.server.AbstractTest)7 Test (org.testng.annotations.Test)7 InputStream (java.io.InputStream)4 ByteArrayInputStream (java.io.ByteArrayInputStream)2 MarcRecordImpl (cz.mzk.recordmanager.server.marc.MarcRecordImpl)1 Collection (java.util.Collection)1 List (java.util.List)1