Package org.springframework.beans

Examples of org.springframework.beans.GenericBean


    input.put("4", "5");
    input.put("6", "7");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertEquals("5", gb.getLongMap().get(new Long("4")));
    assertEquals("7", gb.getLongMap().get(new Long("6")));
  }
View Full Code Here


    input.put("2", value2);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(Boolean.TRUE);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertTrue(gb.getCollectionMap().get(new Integer(1)) instanceof HashSet);
    assertTrue(gb.getCollectionMap().get(new Integer(2)) instanceof ArrayList);
  }
View Full Code Here

    input.add("4");
    input.add("5");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertTrue(gb.getIntegerSet().contains(new Integer(4)));
    assertTrue(gb.getIntegerSet().contains(new Integer(5)));
  }
View Full Code Here

    input2.add("http://localhost:9090");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input2);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertTrue(gb.getIntegerSet().contains(new Integer(4)));
    assertTrue(gb.getIntegerSet().contains(new Integer(5)));
    assertEquals(new UrlResource("http://localhost:8080"), gb.getResourceList().get(0));
    assertEquals(new UrlResource("http://localhost:9090"), gb.getResourceList().get(1));
  }
View Full Code Here

    input2.put("6", "7");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input2);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertTrue(gb.getIntegerSet().contains(new Integer(4)));
    assertTrue(gb.getIntegerSet().contains(new Integer(5)));
    assertEquals(new Integer(5), gb.getShortMap().get(new Short("4")));
    assertEquals(new Integer(7), gb.getShortMap().get(new Short("6")));
  }
View Full Code Here

    input.put("6", "7");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);
    rbd.getConstructorArgumentValues().addGenericArgumentValue("http://localhost:8080");

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertEquals(new Integer(5), gb.getShortMap().get(new Short("4")));
    assertEquals(new Integer(7), gb.getShortMap().get(new Short("6")));
    assertEquals(new UrlResource("http://localhost:8080"), gb.getResourceList().get(0));
  }
View Full Code Here

    input2.put("6", "7");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input2);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertEquals("0", gb.getPlainMap().get("1"));
    assertEquals("3", gb.getPlainMap().get("2"));
    assertEquals(new Integer(5), gb.getShortMap().get(new Short("4")));
    assertEquals(new Integer(7), gb.getShortMap().get(new Short("6")));
  }
View Full Code Here

    input.put("4", "5");
    input.put("6", "7");
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertEquals("5", gb.getLongMap().get(new Long("4")));
    assertEquals("7", gb.getLongMap().get(new Long("6")));
  }
View Full Code Here

    input.put("2", value2);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(Boolean.TRUE);
    rbd.getConstructorArgumentValues().addGenericArgumentValue(input);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertTrue(gb.getCollectionMap().get(new Integer(1)) instanceof HashSet);
    assertTrue(gb.getCollectionMap().get(new Integer(2)) instanceof ArrayList);
  }
View Full Code Here

    input.add("4");
    input.add("5");
    rbd.getPropertyValues().addPropertyValue("integerSet", input);

    bf.registerBeanDefinition("genericBean", rbd);
    GenericBean gb = (GenericBean) bf.getBean("genericBean");

    assertTrue(gb.getIntegerSet().contains(new Integer(4)));
    assertTrue(gb.getIntegerSet().contains(new Integer(5)));
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.GenericBean

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.