Package net.buffalo.protocal.util

Examples of net.buffalo.protocal.util.ClassFieldNamePair


import net.buffalo.protocal.util.ClassFieldNamePair;
import junit.framework.TestCase;

public class ClassFieldNamePairTest extends TestCase {
  public void testEquals() throws Exception {
    ClassFieldNamePair pair1 = new ClassFieldNamePair(Long.class, "something");
    ClassFieldNamePair pair2 = new ClassFieldNamePair(Long.class, "something");
    ClassFieldNamePair pair3 = new ClassFieldNamePair(Double.class, "something");
   
    assertEquals(pair1, pair2);
    assertFalse(pair2.equals(pair3));
   
    Map map = new HashMap();
    map.put(pair1, "pair1");
    map.put(pair2, "pair2");
   
    assertSame("pair2", map.get(new ClassFieldNamePair(Long.class, "something")));
   
  }
View Full Code Here

TOP

Related Classes of net.buffalo.protocal.util.ClassFieldNamePair

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.