|
i find a solution
add this parameters in the testcase configuration
file
<context>
<entry name="environment-context" class="org.apache.cocoon.environment.mock.MockContext"/> </context> Actually i use the context for the getRealPath
method
but in MockContext , this method return the
input path parameter..
there is a addContext method in Excalibur TestCase,
but
i don't know how it work (i try to use but no
success with this sample
DefaultContext avalonContext =
new DefaultContext();
avalonContext.put(Constants.CONTEXT_ENVIRONMENT_CONTEXT, new MockContext()); this.addContext(avalonContext); FileInputStream reader = new
FileInputStream("d:\\testcase.xml");
this.prepare(reader); )
the Ideal will be to create a
MockContext Object
set The root path ( no possible in this version
)
void setRootPath (String root) {
this.root=root;
}
void getRealPath(String path) {
return root+path;
}
and use the addContext method Excalibur
TestCase
|
- tescase avalon component in cocoon Nicolas Maisonneuve
- RE: tescase avalon component in cocoon Ralph Goers
- RE: tescase avalon component in cocoon Ralph Goers
- Nicolas Maisonneuve
