Author: lfryc(a)redhat.com
Date: 2010-07-23 10:17:03 -0400 (Fri, 23 Jul 2010)
New Revision: 18217
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/TestPagination.java
Log:
allow access the private/protected fields by parameter injection
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-07-23
14:16:17 UTC (rev 18216)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractMetamerTest.java 2010-07-23
14:17:03 UTC (rev 18217)
@@ -328,6 +328,7 @@
List<Object> result = new LinkedList<Object>();
for (int i = 0; i < use.value().length; i++) {
boolean satisfied = false;
+ System.out.println(this.getClass().getName());
for (Field field : this.getClass().getDeclaredFields()) {
String name = use.value()[i];
name = StringUtils.replace(name, "*", ".+");
@@ -336,6 +337,7 @@
if (pattern.matcher(field.getName()).matches()) {
if (parameterType.isAssignableFrom(field.getType())) {
try {
+ field.setAccessible(true);
result.add(field.get(this));
satisfied = true;
} catch (Exception e) {
Modified:
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/TestPagination.java
===================================================================
---
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/TestPagination.java 2010-07-23
14:16:17 UTC (rev 18216)
+++
root/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataScroller/TestPagination.java 2010-07-23
14:17:03 UTC (rev 18217)
@@ -54,9 +54,9 @@
@Inject
@Use(value = { "dataScroller*" })
- public AssertingDataScroller dataScroller;
- public AssertingDataScroller dataScroller1 = new
AssertingDataScroller(pjq("span.rf-ds[id$=scroller1]"));
- public AssertingDataScroller dataScroller2 = new
AssertingDataScroller(pjq("span.rf-ds[id$=scroller2]"));
+ AssertingDataScroller dataScroller;
+ AssertingDataScroller dataScroller1 = new
AssertingDataScroller(pjq("span.rf-ds[id$=scroller1]"));
+ AssertingDataScroller dataScroller2 = new
AssertingDataScroller(pjq("span.rf-ds[id$=scroller2]"));
IdLocator attributeFastStep = id("form:attributes:fastStepInput");
IdLocator attributeMaxPages = id("form:attributes:maxPagesInput");