Package com.webobjects.foundation.NSKeyValueCoding

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


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

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "longObjectField");
    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, "longField");
    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$floatField() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "floatObjectField");
    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, "floatField");
    assertEquals(Float.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

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

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

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "doubleObjectField");
    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, "doubleField");
    assertEquals(Double.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

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

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

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "booleanObjectField");
    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, "booleanField");
    assertEquals(Boolean.class, kb.valueType());
    assertTrue(kb.isScalarProperty());

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

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

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

    kb.setValueInObject(FORTY_TWO_STRING, obj);
    assertEquals(FORTY_TWO_STRING, obj.stringField);
  }
View Full Code Here

    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "knownMethod");
    assertEquals(obj.getClass(), kb.targetClass());
    assertEquals("knownMethod", kb.key());
    assertEquals(Integer.class, kb.valueType());
  }
 
  public void testDefaultImplementation$_keyGetBindingForKey$unknownMethod() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();
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.