package com.jinhe.tss.component.dynproperty; import com.jinhe.tss.component.dynproperty.entity.PropertyDef; import junit.framework.TestCase; public class PropertyDefTest extends TestCase { public void testGenColumn() { PropertyDef entity = new PropertyDef(); entity.setName("性别"); entity.setKey("sex"); entity.setType("1"); entity.setAllowMulti(new Integer(1)); entity.setAllowNull(new Integer(0)); entity.setEditor("2"); entity.setOption("1/男\n0/女"); entity.setFormat("XXXXXX"); assertEquals(entity.genColumn(), "<column name=\"sex\" caption=\"性别\" mode=\"string\" empty=\"false\" multiple=\"true\" pattern=\"XXXXXX\" editor=\"comboedit\" editorvalue=\"1|0\" editortext=\"男|女\" />"); } }