From dd93a40e7af07060c72c6c065e31b48cb01f828a Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 22 Jan 2010 16:03:17 +0000 Subject: [PATCH] added test for expression re-evaluation --- .../expression/ApplicationContextExpressionTests.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/org.springframework.context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java b/org.springframework.context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java index 4ee3bb0ae7..393323c862 100644 --- a/org.springframework.context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -145,6 +145,12 @@ public class ApplicationContextExpressionTests { assertEquals(42, tb3.age); assertEquals("123 UK", tb3.country); assertEquals("123 UK", tb3.countryFactory.getObject()); + System.getProperties().put("country", "US"); + assertEquals("123 UK", tb3.country); + assertEquals("123 US", tb3.countryFactory.getObject()); + System.getProperties().put("country", "UK"); + assertEquals("123 UK", tb3.country); + assertEquals("123 UK", tb3.countryFactory.getObject()); assertSame(tb0, tb3.tb); tb3 = (ValueTestBean) SerializationTestUtils.serializeAndDeserialize(tb3); -- GitLab