Code example for MutablePropertyValues

Methods: add

0
	public void testPropertyPlaceholderConfigurerWithNestedUnresolvableReference() { 
		StaticApplicationContext ac = new StaticApplicationContext();
		MutablePropertyValues pvs = new MutablePropertyValues();
		pvs.add("name", "name${var}");
		ac.registerSingleton("tb1", TestBean.class, pvs);
		pvs = new MutablePropertyValues();
		pvs.add("properties", "var=${m}var\nm=${var2}\nvar2=${m2}");
		ac.registerSingleton("configurer1", PropertyPlaceholderConfigurer.class, pvs);
		try { 
			ac.refresh();
			fail("Should have thrown BeanDefinitionStoreException"); 
		} 
		catch (BeanDefinitionStoreException ex) {
			// expected 
			ex.printStackTrace();
		} 
	} 
 
	@Ignore // this test was breaking after the 3.0 repackaging 
	@Test