package de.superx.common; import java.io.IOException; import java.sql.SQLException; import java.util.Locale; import org.junit.Ignore; import org.junit.Test; import de.memtext.tree.KeyParentEqualException; import de.memtext.tree.NoMainEntryException; import freemarker.template.TemplateException; public class FieldTest { // Witt: Ignore this test, as it will possibly never work due to database // dependency!? @Ignore @Test public void testField() { SxUser user = new SxUser("test_user"); SxResultRow sxRow = new SxResultRow(0, 0); SxResultSet sxrs = new SxResultSet(); FieldContainer fc = new FieldContainer(); sxRow.add(Integer.valueOf(16651)); // id sxRow.add("test_feld"); // name sxRow.add(Integer.valueOf(1)); // nummer sxRow.add(Integer.valueOf(0)); // x sxRow.add(Integer.valueOf(0)); // y sxRow.add(Integer.valueOf(0)); // button-breite sxRow.add(Integer.valueOf(0)); // feld-breite sxRow.add(Integer.valueOf(0)); // zeilenanzahl sxRow.add("char"); // typ sxRow.add(Integer.valueOf(10)); // länge sxRow.add(Integer.valueOf(0)); // obligatorisch sxRow.add(Integer.valueOf(10)); // art sxRow.add(""); // relation sxRow.add(""); // attribut sxRow.add(""); // defaultwert try { Field field = new Field("default", user, Integer.valueOf(16650), sxRow, Locale.GERMANY, null, null, fc, sxrs); field.updateDefaultValue(null, null, fc, null, false, user); } catch (TemplateException | KeyParentEqualException | CloneNotSupportedException | SichtException | IOException | SQLException | DBServletException | NoMainEntryException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (UngueltigeEingabeException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvalidDataTypeException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }