Package com.webobjects.foundation.NSKeyValueCoding

Examples of com.webobjects.foundation.NSKeyValueCoding._KeyBinding.valueType()


    kb.setValueInObject(FORTY_TWO, obj);
    assertEquals(FORTY_TWO, obj.integerField);

    kb = DefaultImplementation._keySetBindingForKey(obj, "intMethod");
    assertEquals(Integer.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO, obj);
    assertEquals(FORTY_TWO.intValue(), obj.intField);
  }
View Full Code Here


  public void testDefaultImplementation$_keySetBindingForKey$longMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "longObjectMethod");
    assertEquals(Long.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_LONG, obj);
    assertEquals(FORTY_TWO_LONG, obj.longObjectField);
View Full Code Here

    kb.setValueInObject(FORTY_TWO_LONG, obj);
    assertEquals(FORTY_TWO_LONG, obj.longObjectField);

    kb = DefaultImplementation._keySetBindingForKey(obj, "longMethod");
    assertEquals(Long.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_LONG, obj);
    assertEquals(FORTY_TWO_LONG.longValue(), obj.longField);
View Full Code Here

  public void testDefaultImplementation$_keySetBindingForKey$floatMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "floatObjectMethod");
    assertEquals(Float.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_FLOAT, obj);
    assertEquals(FORTY_TWO_FLOAT, obj.floatObjectField);
   
View Full Code Here

    kb.setValueInObject(FORTY_TWO_FLOAT, obj);
    assertEquals(FORTY_TWO_FLOAT, obj.floatObjectField);
   
    kb = DefaultImplementation._keySetBindingForKey(obj, "floatMethod");
    assertEquals(Float.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_FLOAT, obj);
    assertEquals(FORTY_TWO_FLOAT, obj.floatField);
  }
View Full Code Here

  public void testDefaultImplementation$_keySetBindingForKey$doubleMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "doubleObjectMethod");
    assertEquals(Double.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_DOUBLE, obj);
    assertEquals(FORTY_TWO_DOUBLE, obj.doubleObjectField);
   
View Full Code Here

    kb.setValueInObject(FORTY_TWO_DOUBLE, obj);
    assertEquals(FORTY_TWO_DOUBLE, obj.doubleObjectField);
   
    kb = DefaultImplementation._keySetBindingForKey(obj, "doubleMethod");
    assertEquals(Double.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_DOUBLE, obj);
    assertEquals(FORTY_TWO_DOUBLE, obj.doubleField);
  }
View Full Code Here

  public void testDefaultImplementation$_keySetBindingForKey$booleanMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "booleanObjectMethod");
    assertEquals(Boolean.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(true, obj);
    assertTrue(obj.booleanObjectField);
   
View Full Code Here

    kb.setValueInObject(true, obj);
    assertTrue(obj.booleanObjectField);
   
    kb = DefaultImplementation._keySetBindingForKey(obj, "booleanMethod");
    assertEquals(Boolean.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(true, obj);
    assertTrue(obj.booleanField);
  }
View Full Code Here

 
  public void testDefaultImplementation$_keySetBindingForKey$stringMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "stringMethod");
    assertEquals(String.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_STRING, obj);
    assertEquals(FORTY_TWO_STRING, obj.stringField);
  }
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.