Java Code Examples for org.springframework.tests.sample.beans.TestBean#setCountry()

The following examples show how to use org.springframework.tests.sample.beans.TestBean#setCountry() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OptionsTagTests.java    From spring-analysis-note with MIT License 6 votes vote down vote up
@Override
protected void extendRequest(MockHttpServletRequest request) {
	TestBean bean = new TestBean();
	bean.setName("foo");
	bean.setCountry("UK");
	bean.setMyFloat(new Float("12.34"));
	request.setAttribute(COMMAND_NAME, bean);

	List floats = new ArrayList();
	floats.add(new Float("12.30"));
	floats.add(new Float("12.31"));
	floats.add(new Float("12.32"));
	floats.add(new Float("12.33"));
	floats.add(new Float("12.34"));
	floats.add(new Float("12.35"));

	request.setAttribute("floats", floats);
}
 
Example 2
Source File: OptionsTagTests.java    From java-technology-stack with MIT License 6 votes vote down vote up
@Override
protected void extendRequest(MockHttpServletRequest request) {
	TestBean bean = new TestBean();
	bean.setName("foo");
	bean.setCountry("UK");
	bean.setMyFloat(new Float("12.34"));
	request.setAttribute(COMMAND_NAME, bean);

	List floats = new ArrayList();
	floats.add(new Float("12.30"));
	floats.add(new Float("12.31"));
	floats.add(new Float("12.32"));
	floats.add(new Float("12.33"));
	floats.add(new Float("12.34"));
	floats.add(new Float("12.35"));

	request.setAttribute("floats", floats);
}
 
Example 3
Source File: OptionsTagTests.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
@Override
protected void extendRequest(MockHttpServletRequest request) {
	TestBean bean = new TestBean();
	bean.setName("foo");
	bean.setCountry("UK");
	bean.setMyFloat(new Float("12.34"));
	request.setAttribute(COMMAND_NAME, bean);

	List floats = new ArrayList();
	floats.add(new Float("12.30"));
	floats.add(new Float("12.31"));
	floats.add(new Float("12.32"));
	floats.add(new Float("12.33"));
	floats.add(new Float("12.34"));
	floats.add(new Float("12.35"));

	request.setAttribute("floats", floats);
}
 
Example 4
Source File: FactoryMethodComponent.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) {
	TestBean tb = new TestBean("protectedInstance", 1);
	tb.setSpouse(tb);
	tb.setCountry(country);
	return tb;
}
 
Example 5
Source File: SelectTagTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Test
public void withOtherValue() throws Exception {
	TestBean tb = getTestBean();
	tb.setCountry("AT");
	this.tag.setPath("country");
	this.tag.setItems(Country.getCountries());
	assertList(false);
}
 
Example 6
Source File: SelectTagTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Test
public void withNullValue() throws Exception {
	TestBean tb = getTestBean();
	tb.setCountry(null);
	this.tag.setPath("country");
	this.tag.setItems(Country.getCountries());
	assertList(false);
}
 
Example 7
Source File: FactoryMethodComponent.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) {
	TestBean tb = new TestBean("protectedInstance", 1);
	tb.setSpouse(tb);
	tb.setCountry(country);
	return tb;
}
 
Example 8
Source File: SelectTagTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Test
public void withOtherValue() throws Exception {
	TestBean tb = getTestBean();
	tb.setCountry("AT");
	this.tag.setPath("country");
	this.tag.setItems(Country.getCountries());
	assertList(false);
}
 
Example 9
Source File: SelectTagTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Test
public void withNullValue() throws Exception {
	TestBean tb = getTestBean();
	tb.setCountry(null);
	this.tag.setPath("country");
	this.tag.setItems(Country.getCountries());
	assertList(false);
}
 
Example 10
Source File: FactoryMethodComponent.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) {
	TestBean tb = new TestBean("protectedInstance", 1);
	tb.setSpouse(tb);
	tb.setCountry(country);
	return tb;
}
 
Example 11
Source File: SelectTagTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Test
public void withOtherValue() throws Exception {
	TestBean tb = getTestBean();
	tb.setCountry("AT");
	this.tag.setPath("country");
	this.tag.setItems(Country.getCountries());
	assertList(false);
}
 
Example 12
Source File: SelectTagTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Test
public void withNullValue() throws Exception {
	TestBean tb = getTestBean();
	tb.setCountry(null);
	this.tag.setPath("country");
	this.tag.setItems(Country.getCountries());
	assertList(false);
}