Updates for page management, including updating link to menu ordering on page list, updating internal class server side logic to correctly instantiate objects when editing an internal class page (previously json object was passed but wasn't needed so removed from constructor), also updated client-side script to correctly populate internal class/class group section and other client-side interactions
This commit is contained in:
parent
16f860e515
commit
c46b148535
10 changed files with 296 additions and 266 deletions
|
@ -1,32 +0,0 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue