Package com.webobjects.foundation.NSKeyValueCoding

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


  public void testDefaultImplementation$_keyGetBindingForKey$floatField() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "floatObjectField");
    assertEquals(Float.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.floatObjectField = FORTY_TWO_FLOAT;
    assertEquals(FORTY_TWO_FLOAT, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "floatField");
View Full Code Here


    assertFalse(kb.isScalarProperty());
    obj.floatObjectField = FORTY_TWO_FLOAT;
    assertEquals(FORTY_TWO_FLOAT, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "floatField");
    assertEquals(Float.class, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.floatField = FORTY_TWO_FLOAT;
    assertEquals(FORTY_TWO_FLOAT, kb.valueInObject(obj));
  }
 
View Full Code Here

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

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "doubleObjectField");
    assertEquals(Double.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.doubleObjectField = FORTY_TWO_DOUBLE;
    assertEquals(FORTY_TWO_DOUBLE, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "doubleField");
View Full Code Here

    assertFalse(kb.isScalarProperty());
    obj.doubleObjectField = FORTY_TWO_DOUBLE;
    assertEquals(FORTY_TWO_DOUBLE, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "doubleField");
    assertEquals(Double.class, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.doubleField = FORTY_TWO_DOUBLE;
    assertEquals(FORTY_TWO_DOUBLE, kb.valueInObject(obj));
  }
View Full Code Here

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

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "booleanObjectField");
    assertEquals(Boolean.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.booleanObjectField = true;
    assertEquals(Boolean.TRUE, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "booleanField");
View Full Code Here

    assertFalse(kb.isScalarProperty());
    obj.booleanObjectField = true;
    assertEquals(Boolean.TRUE, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "booleanField");
    assertEquals(Boolean.class, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.booleanField = true;
    assertEquals(Boolean.TRUE, kb.valueInObject(obj));
  }
View Full Code Here

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

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "stringField");
    assertEquals(String.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.stringField = FORTY_TWO_STRING;
    assertEquals(FORTY_TWO_STRING, kb.valueInObject(obj));
  }
View Full Code Here

    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "knownField");
    assertEquals(obj.getClass(), kb.targetClass());
    assertEquals("knownField", kb.key());
    assertEquals(Integer.class, kb.valueType());
  }
 
  public void testDefaultImplementation$_keySetBindingForKey$byteField() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();
View Full Code Here

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

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

    kb.setValueInObject(FORTY_TWO_BYTE, obj);
    assertEquals(FORTY_TWO_BYTE, obj.byteObjectField);
   
View Full Code Here

    kb.setValueInObject(FORTY_TWO_BYTE, obj);
    assertEquals(FORTY_TWO_BYTE, obj.byteObjectField);
   
    kb = DefaultImplementation._keySetBindingForKey(obj, "byteField");
    assertEquals(Byte.TYPE, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_BYTE, obj);
    assertEquals(FORTY_TWO_BYTE.byteValue(), obj.byteField);
  }
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.