Package com.webobjects.foundation.NSKeyValueCoding

Examples of com.webobjects.foundation.NSKeyValueCoding._KeyBinding


  }
 
  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);
   
    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


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

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

    kb.setValueInObject(FORTY_TWO, obj);
    assertEquals(FORTY_TWO, obj.integerField);
   
    kb = DefaultImplementation._keySetBindingForKey(obj, "intField");
    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$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);
   
    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

TOP

Related Classes of com.webobjects.foundation.NSKeyValueCoding._KeyBinding

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.