Examples of EditField


Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

        synchronized(this){
            if (value == null)
                return(false);
           
            try {
                EditField val = typeCheck(v);
                return(value.contains(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

    }
   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2010)
    public EditField set(Object v) throws DmcValueException {
        EditField rc = typeCheck(v);
        // We only return a value if the value actually changed. This supports
        // the applyModifier() mechanism on DmcObject where we only return true
        // if something changed as a result of the modifier
        if (value == null)
            value = rc;
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

       
  }

  @Test
  public void labelMissing() throws DmcValueException{
    EditField ef = null;
       
    try {
      ef = new EditField("attribute editor : ");
      assertTrue("Should have indicated that the label was missing.", false);
    } catch (DmcValueException e1) {
      System.out.println("Expected:\n" + e1);
      assertTrue("Expected exception", true);
    }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

   
  }

  @Test
  public void haveLabel() throws DmcValueException{
    EditField ef = null;
       
    ef = new EditField("attribute editor : field label");
    assertEquals("Label should be field label", "field label", ef.getLabel());
   
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

   
  }

  @Test
  public void missingtoolTip() throws DmcValueException{
    EditField ef = null;
       
    try {
      ef = new EditField("attribute editor : label : ");
      assertTrue("Should have indicated that the tool tip was missing.", false);
    } catch (DmcValueException e1) {
      System.out.println("Expected:\n" + e1);
      assertTrue("Expected exception", true);
    }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

   
  }

  @Test
  public void extraneousTokens() throws DmcValueException{
    EditField ef = null;
       
    try {
      ef = new EditField("attribute editor : label : tooltip :");
      assertTrue("Should have indicated extraneous colons.", false);
    } catch (DmcValueException e1) {
      System.out.println("Expected:\n" + e1);
      assertTrue("Expected exception", true);
    }
   
    try {
      ef = new EditField("attribute editor :: label : tooltip ");
      assertTrue("Should have indicated extraneous colons.", false);
    } catch (DmcValueException e1) {
      System.out.println("Expected:\n" + e1);
      assertTrue("Expected exception", true);
    }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

   
  }

  @Test
  public void haveToolTip() throws DmcValueException {
    EditField ef = null;
       
    ef = new EditField("attribute editor : label : tool tip");
    assertEquals("Tool tip should be tool tip", "tool tip", ef.getTip());
   
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

   
  }

  @Test
  public void isReadonly() throws DmcValueException{
    EditField ef = null;
   
    ef = new EditField("attribute editor RO");
    assertEquals("Should be read only", true, ef.isReadOnly());
   
    ef = new EditField("attribute      editor RO ");
    assertEquals("Should be read only", true, ef.isReadOnly());
   
    ef = new EditField("attribute editor RO: label : tool tip");
    assertEquals("Should be read only", true, ef.isReadOnly());
   
    ef = new EditField("attribute      editor RO : label : tool tip");
    assertEquals("Should be read only", true, ef.isReadOnly());
   
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

   
  }

  @Test
  public void isMandatory() throws DmcValueException{
    EditField ef = null;
   
    ef = new EditField("attribute editor MUST: label : tool tip");
    assertEquals("Should be read only", true, ef.isMandatory());
   
    ef = new EditField("attribute editor MUST");
    assertEquals("Should be mandatory", true, ef.isMandatory());
   
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.EditField

@SuppressWarnings("unused")
public class EditFieldTest {

  @Test
  public void missingEditorField() throws DmcValueException{
    EditField ef = null;
   
    try {
      ef = new EditField("attribute");
      assertTrue("Should have indicated that the edit field was malformed", false);
    } catch (DmcValueException e1) {
      assertTrue("Expected exception", true);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.