You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2009/10/31 19:18:05 UTC
svn commit: r831577 - in /tiles/framework/branches/TILES_2_1_X: ./
tiles-api/src/main/java/org/apache/tiles/
tiles-api/src/test/java/org/apache/tiles/ tiles-core/
tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/ tiles-test/
Author: apetrelli
Date: Sat Oct 31 18:18:04 2009
New Revision: 831577
URL: http://svn.apache.org/viewvc?rev=831577&view=rev
Log:
TILES-483
Merge from the trunk to TILES_2_1_X branch.
Fixed cascaded attribute management.
Modified:
tiles/framework/branches/TILES_2_1_X/ (props changed)
tiles/framework/branches/TILES_2_1_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java
tiles/framework/branches/TILES_2_1_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java
tiles/framework/branches/TILES_2_1_X/tiles-core/ (props changed)
tiles/framework/branches/TILES_2_1_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/ (props changed)
tiles/framework/branches/TILES_2_1_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/ImportAttributeTagTest.java (props changed)
tiles/framework/branches/TILES_2_1_X/tiles-test/ (props changed)
Propchange: tiles/framework/branches/TILES_2_1_X/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 31 18:18:04 2009
@@ -1 +1,2 @@
-/tiles/framework/trunk:749981,761052,761061,772781,785782,788065-789653,798944,814331,814761,817357,819630,819641
+/tiles/framework/trunk:749981,761052,761061,772781,785782,788065-789653,798944,814331,814761,817357,819630,819641,831448
+/tiles/sandbox/trunk/tiles3:831431-831440
Modified: tiles/framework/branches/TILES_2_1_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_1_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java?rev=831577&r1=831576&r2=831577&view=diff
==============================================================================
--- tiles/framework/branches/TILES_2_1_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java (original)
+++ tiles/framework/branches/TILES_2_1_X/tiles-api/src/main/java/org/apache/tiles/BasicAttributeContext.java Sat Oct 31 18:18:04 2009
@@ -70,7 +70,6 @@
* @since 2.1.0
*/
public BasicAttributeContext() {
- super();
}
/**
@@ -255,8 +254,9 @@
}
if (attributes == null) {
- attributes = new HashMap<String, Attribute>(defaultAttributes);
+ attributes = new HashMap<String, Attribute>();
if (cascadedAttributes == null || cascadedAttributes.isEmpty()) {
+ attributes.putAll(defaultAttributes);
return;
}
}
@@ -265,7 +265,7 @@
for (Map.Entry<String, Attribute> entry : entries) {
String key = entry.getKey();
if (!attributes.containsKey(key)
- && (cascadedAttributes == null || cascadedAttributes
+ && (cascadedAttributes == null || !cascadedAttributes
.containsKey(key))) {
attributes.put(entry.getKey(), entry.getValue());
}
Modified: tiles/framework/branches/TILES_2_1_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java
URL: http://svn.apache.org/viewvc/tiles/framework/branches/TILES_2_1_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java?rev=831577&r1=831576&r2=831577&view=diff
==============================================================================
--- tiles/framework/branches/TILES_2_1_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java (original)
+++ tiles/framework/branches/TILES_2_1_X/tiles-api/src/test/java/org/apache/tiles/BasicAttributeContextTest.java Sat Oct 31 18:18:04 2009
@@ -20,6 +20,9 @@
*/
package org.apache.tiles;
+import static org.junit.Assert.*;
+import static org.easymock.EasyMock.*;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -28,20 +31,19 @@
import java.util.Map;
import java.util.Set;
-import org.easymock.EasyMock;
-
-import junit.framework.TestCase;
+import org.junit.Test;
/**
* Tests <code>BasicAttributeContext</code>.
*
* @version $Rev$ $Date$
*/
-public class BasicAttributeContextTest extends TestCase {
+public class BasicAttributeContextTest {
/**
* Tests {@link BasicAttributeContext#BasicAttributeContext()}.
*/
+ @Test
public void testBasicAttributeContext() {
AttributeContext context = new BasicAttributeContext();
assertNull("There are some spurious attributes", context
@@ -53,6 +55,7 @@
/**
* Tests {@link BasicAttributeContext#BasicAttributeContext(Map)}.
*/
+ @Test
public void testBasicAttributeContextMapOfStringAttribute() {
Map<String, Attribute> name2attrib = new HashMap<String, Attribute>();
Attribute attribute = new Attribute("Value 1");
@@ -74,6 +77,7 @@
* Tests
* {@link BasicAttributeContext#BasicAttributeContext(AttributeContext)}.
*/
+ @Test
public void testBasicAttributeContextAttributeContext() {
Set<String> localAttributes = new LinkedHashSet<String>();
Set<String> cascadedAttributes = new LinkedHashSet<String>();
@@ -81,27 +85,26 @@
localAttributes.add("local2");
cascadedAttributes.add("cascaded1");
cascadedAttributes.add("cascaded2");
- AttributeContext toCopy = EasyMock.createMock(AttributeContext.class);
- EasyMock.expect(toCopy.getLocalAttributeNames()).andReturn(
- localAttributes);
- EasyMock.expect(toCopy.getLocalAttribute("local1")).andReturn(
+ AttributeContext toCopy = createMock(AttributeContext.class);
+ expect(toCopy.getLocalAttributeNames()).andReturn(localAttributes);
+ expect(toCopy.getLocalAttribute("local1")).andReturn(
new Attribute("value1")).anyTimes();
- EasyMock.expect(toCopy.getLocalAttribute("local2")).andReturn(
+ expect(toCopy.getLocalAttribute("local2")).andReturn(
new Attribute("value2")).anyTimes();
- EasyMock.expect(toCopy.getCascadedAttributeNames()).andReturn(
- cascadedAttributes);
- EasyMock.expect(toCopy.getCascadedAttribute("cascaded1")).andReturn(
+ expect(toCopy.getCascadedAttributeNames())
+ .andReturn(cascadedAttributes);
+ expect(toCopy.getCascadedAttribute("cascaded1")).andReturn(
new Attribute("value3")).anyTimes();
- EasyMock.expect(toCopy.getCascadedAttribute("cascaded2")).andReturn(
+ expect(toCopy.getCascadedAttribute("cascaded2")).andReturn(
new Attribute("value4")).anyTimes();
Attribute templateAttribute = new Attribute("/template.jsp",
"expression", "role1,role2", "template");
- EasyMock.expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute);
+ expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute);
Set<String> roles = new HashSet<String>();
roles.add("role1");
roles.add("role2");
- EasyMock.expect(toCopy.getPreparer()).andReturn("my.preparer.Preparer");
- EasyMock.replay(toCopy);
+ expect(toCopy.getPreparer()).andReturn("my.preparer.Preparer");
+ replay(toCopy);
BasicAttributeContext context = new BasicAttributeContext(toCopy);
assertEquals("The template has not been set correctly",
"/template.jsp", context.getTemplateAttribute().getValue());
@@ -131,10 +134,12 @@
/**
* Tests
- * {@link BasicAttributeContext#BasicAttributeContext(BasicAttributeContext)}.
+ * {@link BasicAttributeContext#BasicAttributeContext(BasicAttributeContext)}
+ * .
*/
+ @Test
public void testBasicAttributeContextBasicAttributeContext() {
- AttributeContext toCopy = new BasicAttributeContext();
+ BasicAttributeContext toCopy = new BasicAttributeContext();
toCopy.putAttribute("name1", new Attribute("value1"), false);
toCopy.putAttribute("name2", new Attribute("value2"), true);
Attribute templateAttribute = Attribute
@@ -163,8 +168,11 @@
}
/**
- * Tests {@link BasicAttributeContext#inheritCascadedAttributes(AttributeContext)}.
+ * Tests
+ * {@link BasicAttributeContext#inheritCascadedAttributes(AttributeContext)}
+ * .
*/
+ @Test
public void testInheritCascadedAttributes() {
AttributeContext toCopy = new BasicAttributeContext();
toCopy.putAttribute("name1", new Attribute("value1"), false);
@@ -184,6 +192,7 @@
* testing inheritance between {@link ListAttribute} instances.
*/
@SuppressWarnings("unchecked")
+ @Test
public void testInheritListAttribute() {
AttributeContext toCopy = new BasicAttributeContext();
ListAttribute parentListAttribute = new ListAttribute();
@@ -201,7 +210,8 @@
assertNotNull("The list must exist", value);
assertEquals("The size is not correct", 2, value.size());
assertEquals("The first element is not correct", "first", value.get(0));
- assertEquals("The second element is not correct", "second", value.get(1));
+ assertEquals("The second element is not correct", "second", value
+ .get(1));
context = new BasicAttributeContext();
listAttribute = new ListAttribute();
@@ -213,23 +223,110 @@
value = (List<Object>) result.getValue();
assertNotNull("The list must exist", value);
assertEquals("The size is not correct", 1, value.size());
- assertEquals("The second element is not correct", "second", value.get(0));
+ assertEquals("The second element is not correct", "second", value
+ .get(0));
}
/**
- * Tests {@link BasicAttributeContext#inheritCascadedAttributes(AttributeContext)}.
+ * Tests
+ * {@link BasicAttributeContext#inheritCascadedAttributes(AttributeContext)}
+ * .
*/
+ @Test
public void testInherit() {
AttributeContext toCopy = new BasicAttributeContext();
+ Attribute parentTemplateAttribute = new Attribute();
+ parentTemplateAttribute.setValue("/parent/template.jsp");
+ toCopy.setTemplateAttribute(parentTemplateAttribute);
toCopy.putAttribute("name1", new Attribute("value1"), true);
toCopy.putAttribute("name2", new Attribute("value2"), true);
toCopy.putAttribute("name3", new Attribute("value3"), false);
toCopy.putAttribute("name4", new Attribute("value4"), false);
AttributeContext context = new BasicAttributeContext();
- toCopy.putAttribute("name1", new Attribute("newValue1"), true);
- toCopy.putAttribute("name3", new Attribute("newValue3"), false);
+ Attribute templateAttribute = new Attribute();
+ templateAttribute.setRole("role1,role2");
+ context.setTemplateAttribute(templateAttribute);
+ context.putAttribute("name1", new Attribute("newValue1"), true);
+ context.putAttribute("name3", new Attribute("newValue3"), false);
+ context.inherit(toCopy);
+ Attribute attribute = context.getTemplateAttribute();
+ assertEquals("/parent/template.jsp", attribute.getValue());
+ assertTrue(attribute.getRoles().contains("role1"));
+ assertTrue(attribute.getRoles().contains("role2"));
+ attribute = context.getCascadedAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "newValue1",
+ attribute.getValue());
+ attribute = context.getCascadedAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "value2",
+ attribute.getValue());
+ attribute = context.getLocalAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "newValue3",
+ attribute.getValue());
+ attribute = context.getLocalAttribute("name4");
+ assertNotNull("Attribute name4 not found", attribute);
+ assertEquals("Attribute name4 has not been set correctly", "value4",
+ attribute.getValue());
+
+ toCopy = new BasicAttributeContext();
+ toCopy.putAttribute("name1", new Attribute("value1"), true);
+ toCopy.putAttribute("name2", new Attribute("value2"), true);
+ toCopy.putAttribute("name3", new Attribute("value3"), false);
+ toCopy.putAttribute("name4", new Attribute("value4"), false);
+ context = new BasicAttributeContext();
+ context.inherit(toCopy);
+ attribute = context.getCascadedAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "value1",
+ attribute.getValue());
+ attribute = context.getCascadedAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "value2",
+ attribute.getValue());
+ attribute = context.getLocalAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "value3",
+ attribute.getValue());
+ attribute = context.getLocalAttribute("name4");
+ assertNotNull("Attribute name4 not found", attribute);
+ assertEquals("Attribute name4 has not been set correctly", "value4",
+ attribute.getValue());
+ }
+
+ /**
+ * Tests
+ * {@link BasicAttributeContext#inherit(AttributeContext)}
+ * .
+ */
+ @Test
+ public void testInheritAttributeContext() {
+ AttributeContext toCopy = createMock(AttributeContext.class);
+ Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+ expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute);
+ expect(toCopy.getPreparer()).andReturn("my.preparer");
+ Set<String> cascadedNames = new HashSet<String>();
+ cascadedNames.add("name1");
+ cascadedNames.add("name2");
+ expect(toCopy.getCascadedAttributeNames()).andReturn(cascadedNames);
+ expect(toCopy.getCascadedAttribute("name1")).andReturn(new Attribute("value1"));
+ expect(toCopy.getCascadedAttribute("name2")).andReturn(new Attribute("value2"));
+ Set<String> names = new HashSet<String>();
+ names.add("name3");
+ names.add("name4");
+ expect(toCopy.getLocalAttributeNames()).andReturn(names);
+ expect(toCopy.getLocalAttribute("name3")).andReturn(new Attribute("value3"));
+ expect(toCopy.getLocalAttribute("name4")).andReturn(new Attribute("value4"));
+
+ replay(toCopy);
+ AttributeContext context = new BasicAttributeContext();
+ context.putAttribute("name1", new Attribute("newValue1"), true);
+ context.putAttribute("name3", new Attribute("newValue3"), false);
context.inherit(toCopy);
Attribute attribute = context.getCascadedAttribute("name1");
+ assertEquals("/my/template.jsp", context.getTemplateAttribute().getValue());
+ assertEquals("my.preparer", context.getPreparer());
assertNotNull("Attribute name1 not found", attribute);
assertEquals("Attribute name1 has not been set correctly", "newValue1",
attribute.getValue());
@@ -245,11 +342,80 @@
assertNotNull("Attribute name4 not found", attribute);
assertEquals("Attribute name4 has not been set correctly", "value4",
attribute.getValue());
+ verify(toCopy);
+ }
+
+ /**
+ * Tests {@link BasicAttributeContext#inherit(AttributeContext)}
+ * testing inheritance between {@link ListAttribute} instances.
+ */
+ @SuppressWarnings("unchecked")
+ @Test
+ public void testInheritAttributeContextListAttribute() {
+ AttributeContext toCopy = createMock(AttributeContext.class);
+ Attribute templateAttribute = Attribute.createTemplateAttribute("/my/template.jsp");
+ expect(toCopy.getTemplateAttribute()).andReturn(templateAttribute).times(2);
+ expect(toCopy.getPreparer()).andReturn("my.preparer").times(2);
+ ListAttribute parentListAttribute = new ListAttribute();
+ parentListAttribute.add("first");
+ ListAttribute parentListAttribute2 = new ListAttribute();
+ parentListAttribute2.add("third");
+ Set<String> names = new HashSet<String>();
+ names.add("list");
+ Set<String> cascadedNames = new HashSet<String>();
+ cascadedNames.add("list2");
+ expect(toCopy.getCascadedAttributeNames()).andReturn(cascadedNames).times(2);
+ expect(toCopy.getCascadedAttribute("list2")).andReturn(parentListAttribute2).times(2);
+ expect(toCopy.getLocalAttributeNames()).andReturn(names).times(2);
+ expect(toCopy.getLocalAttribute("list")).andReturn(parentListAttribute).times(2);
+
+ replay(toCopy);
+ AttributeContext context = new BasicAttributeContext();
+ ListAttribute listAttribute = new ListAttribute();
+ listAttribute.setInherit(true);
+ listAttribute.add("second");
+ context.putAttribute("list", listAttribute, false);
+ ListAttribute listAttribute2 = new ListAttribute();
+ listAttribute2.setInherit(true);
+ listAttribute2.add("fourth");
+ context.putAttribute("list2", listAttribute2, true);
+ context.inherit(toCopy);
+ ListAttribute result = (ListAttribute) context.getAttribute("list");
+ assertNotNull("The attribute must exist", result);
+ List<Object> value = (List<Object>) result.getValue();
+ assertNotNull("The list must exist", value);
+ assertEquals("The size is not correct", 2, value.size());
+ assertEquals("The first element is not correct", "first", value.get(0));
+ assertEquals("The second element is not correct", "second", value
+ .get(1));
+ result = (ListAttribute) context.getAttribute("list2");
+ assertNotNull("The attribute must exist", result);
+ value = (List<Object>) result.getValue();
+ assertNotNull("The list must exist", value);
+ assertEquals("The size is not correct", 2, value.size());
+ assertEquals("The first element is not correct", "third", value.get(0));
+ assertEquals("The second element is not correct", "fourth", value
+ .get(1));
+
+ context = new BasicAttributeContext();
+ listAttribute = new ListAttribute();
+ listAttribute.add("second");
+ context.putAttribute("list", listAttribute);
+ context.inherit(toCopy);
+ result = (ListAttribute) context.getAttribute("list");
+ assertNotNull("The attribute must exist", result);
+ value = (List<Object>) result.getValue();
+ assertNotNull("The list must exist", value);
+ assertEquals("The size is not correct", 1, value.size());
+ assertEquals("The second element is not correct", "second", value
+ .get(0));
+ verify(toCopy);
}
/**
* Tests {@link BasicAttributeContext#addAll(Map)}.
*/
+ @Test
public void testAddAll() {
AttributeContext context = new BasicAttributeContext();
Map<String, Attribute> name2attrib = new HashMap<String, Attribute>();
@@ -266,11 +432,38 @@
assertNotNull("Attribute name2 not found", attribute);
assertEquals("Attribute name2 has not been set correctly", "Value 2",
attribute.getValue());
+
+ context.addAll(null);
+ attribute = context.getAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "Value 1",
+ attribute.getValue());
+ attribute = context.getAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "Value 2",
+ attribute.getValue());
+
+ name2attrib = new HashMap<String, Attribute>();
+ name2attrib.put("name3", new Attribute("Value 3"));
+ context.addAll(name2attrib);
+ attribute = context.getAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "Value 1",
+ attribute.getValue());
+ attribute = context.getAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "Value 2",
+ attribute.getValue());
+ attribute = context.getAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "Value 3",
+ attribute.getValue());
}
/**
* Tests {@link BasicAttributeContext#addMissing(Map)}.
*/
+ @Test
public void testAddMissing() {
Map<String, Attribute> name2attrib = new HashMap<String, Attribute>();
Attribute attribute = new Attribute("Value 1");
@@ -294,11 +487,74 @@
assertNotNull("Attribute name3 not found", attribute);
assertEquals("Attribute name3 has not been set correctly", "Value 3",
attribute.getValue());
+
+ context.addMissing(null);
+ attribute = context.getAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "Value 1",
+ attribute.getValue());
+ attribute = context.getAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "Value 2",
+ attribute.getValue());
+ attribute = context.getAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "Value 3",
+ attribute.getValue());
+
+ context = new BasicAttributeContext();
+ name2attrib = new HashMap<String, Attribute>();
+ name2attrib.put("name1", new Attribute("Value 1a"));
+ name2attrib.put("name3", new Attribute("Value 3"));
+ context.addMissing(name2attrib);
+ attribute = context.getAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "Value 1a",
+ attribute.getValue());
+ attribute = context.getAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "Value 3",
+ attribute.getValue());
+
+ context = new BasicAttributeContext();
+ context.putAttribute("name2", new Attribute("Value 2a"), true);
+ name2attrib = new HashMap<String, Attribute>();
+ name2attrib.put("name1", new Attribute("Value 1a"));
+ name2attrib.put("name3", new Attribute("Value 3"));
+ context.addMissing(name2attrib);
+ attribute = context.getAttribute("name1");
+ assertNotNull("Attribute name1 not found", attribute);
+ assertEquals("Attribute name1 has not been set correctly", "Value 1a",
+ attribute.getValue());
+ attribute = context.getAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "Value 2a",
+ attribute.getValue());
+ attribute = context.getAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "Value 3",
+ attribute.getValue());
+
+ context = new BasicAttributeContext();
+ context.putAttribute("name2", new Attribute("Value 2a"), true);
+ name2attrib = new HashMap<String, Attribute>();
+ name2attrib.put("name2", new Attribute("Value 2b"));
+ name2attrib.put("name3", new Attribute("Value 3"));
+ context.addMissing(name2attrib);
+ attribute = context.getAttribute("name2");
+ assertNotNull("Attribute name2 not found", attribute);
+ assertEquals("Attribute name2 has not been set correctly", "Value 2a",
+ attribute.getValue());
+ attribute = context.getAttribute("name3");
+ assertNotNull("Attribute name3 not found", attribute);
+ assertEquals("Attribute name3 has not been set correctly", "Value 3",
+ attribute.getValue());
}
/**
* Tests {@link BasicAttributeContext#getAttribute(String)}.
*/
+ @Test
public void testGetAttribute() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -322,6 +578,7 @@
/**
* Tests {@link BasicAttributeContext#getLocalAttribute(String)}.
*/
+ @Test
public void testGetLocalAttribute() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -343,6 +600,7 @@
/**
* Tests {@link BasicAttributeContext#getCascadedAttribute(String)}.
*/
+ @Test
public void testGetCascadedAttribute() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -364,6 +622,7 @@
/**
* Tests {@link BasicAttributeContext#getLocalAttributeNames()}.
*/
+ @Test
public void testGetLocalAttributeNames() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -379,6 +638,7 @@
/**
* Tests {@link BasicAttributeContext#getCascadedAttributeNames()}.
*/
+ @Test
public void testGetCascadedAttributeNames() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -394,6 +654,7 @@
/**
* Tests {@link BasicAttributeContext#putAttribute(String, Attribute)}.
*/
+ @Test
public void testPutAttributeStringAttribute() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"));
@@ -409,6 +670,7 @@
* Tests
* {@link BasicAttributeContext#putAttribute(String, Attribute, boolean)}.
*/
+ @Test
public void testPutAttributeStringAttributeBoolean() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -430,6 +692,7 @@
/**
* Tests {@link BasicAttributeContext#clear()}.
*/
+ @Test
public void testClear() {
AttributeContext context = new BasicAttributeContext();
context.putAttribute("name1", new Attribute("value1"), false);
@@ -446,6 +709,7 @@
/**
* Tests {@link BasicAttributeContext} for the TILES-429 bug.
*/
+ @Test
public void testTiles429() {
AttributeContext toCopy = new BasicAttributeContext();
toCopy.putAttribute("name1", new Attribute("value1"), false);
Propchange: tiles/framework/branches/TILES_2_1_X/tiles-core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 31 18:18:04 2009
@@ -1 +1 @@
-/tiles/framework/trunk/tiles-core:749981,761052,761061,772781,784975,785782,788065-789653,798944,814331,814761,819630,819641
+/tiles/framework/trunk/tiles-core:749981,761052,761061,772781,784975,785782,788065-789653,798944,814331,814761,819630,819641,831448
Propchange: tiles/framework/branches/TILES_2_1_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 31 18:18:04 2009
@@ -1 +1 @@
-/tiles/framework/trunk/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib:749981,761052,761061,772781,785782,788065-789653,798944*,814331*,814761*,817357*,819630*,819641*
+/tiles/framework/trunk/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib:749981,761052,761061,772781,785782,788065-789653,798944*,814331*,814761*,817357*,819630*,819641*,831448
Propchange: tiles/framework/branches/TILES_2_1_X/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/ImportAttributeTagTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 31 18:18:04 2009
@@ -1 +1 @@
-/tiles/framework/trunk/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/ImportAttributeTagTest.java:749981,761052,761061,772781,785782,788065-789653,798944,814331,814761,817357,819630,819641
+/tiles/framework/trunk/tiles-jsp/src/test/java/org/apache/tiles/jsp/taglib/ImportAttributeTagTest.java:749981,761052,761061,772781,785782,788065-789653,798944,814331,814761,817357,819630,819641,831448
Propchange: tiles/framework/branches/TILES_2_1_X/tiles-test/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 31 18:18:04 2009
@@ -1 +1 @@
-/tiles/framework/trunk/tiles-test:747340,772781,785782,788065-789653,798944,814331,814761,817357,819630,819641
+/tiles/framework/trunk/tiles-test:747340,772781,785782,788065-789653,798944,814331,814761,817357,819630,819641,831448