Package honeycrm.client.field

Examples of honeycrm.client.field.FieldCurrency


import junit.framework.TestCase;

// TODO rewrite formatting tests without requiring client side GWT.create() call caused by NumberFormat/Random class.
public class FieldCurrencyTest extends TestCase {
  public void testFormatting() {
    final AbstractField field = new FieldCurrency("revenue", "Some label", "0");

    final Dto test = new Dto();
    test.set("1", 0);
    test.set("2", Integer.MAX_VALUE);
    test.set("3", Integer.MIN_VALUE);
View Full Code Here


     * for (final String key: test.getAllData().keySet()) { field.getWidget(View.DETAIL, test, key); }
     */
  }

  public void testGetData() {
    final AbstractField field = new FieldCurrency("income", "Some label", "0");
    // final String formattedString = NumberFormat.getCurrencyFormat("EUR").format(Double.MAX_VALUE);
    // assertEquals(Double.MAX_VALUE, field.getData(formattedString));
  }
View Full Code Here

      } else if (field.isAnnotationPresent(FieldRelateAnnotation.class)) {
        final String relatedEntity = field.getAnnotation(FieldRelateAnnotation.class).value().getSimpleName();
        fields.put(name, new FieldRelate(name, relatedEntity, label));
      } else if (field.isAnnotationPresent(FieldCurrencyAnnotation.class)) {
        final String defaultValue = field.getAnnotation(FieldCurrencyAnnotation.class).value();
        fields.put(name, new FieldCurrency(name, label, defaultValue));
      } else if (field.isAnnotationPresent(FieldDateAnnotation.class)) {
        fields.put(name, new FieldDate(name, label));
      } else if (field.isAnnotationPresent(FieldTableAnnotation.class)) {
        // TODO pass tableClass to the FieldTable constructor
        // final Class<?> tableClass = field.getAnnotation(FieldTableAnnotation.class).value();
View Full Code Here

TOP

Related Classes of honeycrm.client.field.FieldCurrency

Copyright © 2018 www.massapicom. 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.