page management updates

This commit is contained in:
hjkhjk54 2012-06-13 19:37:04 +00:00
parent 297e943635
commit 4e96cd318d
16 changed files with 756 additions and 28 deletions

View file

@ -0,0 +1,30 @@
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.preprocessors.utils;
import static org.junit.Assert.*;
import java.util.List;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.junit.Test;
public class ProcessIndividualsForClassesDataGetterN3Test {
@Test
public void testRetrieveN3Required() {
JSONObject jsonObject = new JSONObject();
JSONArray ja = new JSONArray();
ja.add("test1");
ja.add("test2");
jsonObject.element("classesSelectedInClassGroup", ja);
ProcessIndividualsForClassesDataGetterN3 pn = new ProcessIndividualsForClassesDataGetterN3(jsonObject);
List<String> retrievedN3 = pn.retrieveN3Required(0);
String firstString = retrievedN3.get(0);
//check whether correct type returned
int index = firstString.indexOf(pn.getClassType());
assert(firstString.indexOf(index) != -1);
}
}