Michael Rimov
2008-11-01 06:13:33 UTC
Hi All,
I've never really played with the Ruby language or builder, but since
I've had compilation performance problems with Groovy, I've been
writing a scripting language comparison test case to get an idea of
where all the different builders stood with each other
performance-wise.
However, I've been unable to figure out how to reference
Pararameter.ZERO from Ruby. Currently my test case looks like this:
@Test
public void testParameterZero() {
Reader script = new StringReader("" +
"import org.picocontainer.Parametern" +
"n" +
"container{n" +
" component(:class => java.util.ArrayList,
:parameters => Parameter::ZERO)n" +
" component(:class => java.util.HashSet,
:parameters => Parameter::ZERO)n" +
"}n"
);
PicoContainer pico = buildContainer(script, null,
ASSEMBLY_SCOPE);
assertNotNull(pico.getComponent(ArrayList.class));
assertNotNull(pico.getComponent(HashSet.class));
}
However, I get a CyclicDependencyException much as if I hadn't
specified Parameter.ZERO in the first place. Any clues?
Thanks :)
-Mike (R)
I've never really played with the Ruby language or builder, but since
I've had compilation performance problems with Groovy, I've been
writing a scripting language comparison test case to get an idea of
where all the different builders stood with each other
performance-wise.
However, I've been unable to figure out how to reference
Pararameter.ZERO from Ruby. Currently my test case looks like this:
@Test
public void testParameterZero() {
Reader script = new StringReader("" +
"import org.picocontainer.Parametern" +
"n" +
"container{n" +
" component(:class => java.util.ArrayList,
:parameters => Parameter::ZERO)n" +
" component(:class => java.util.HashSet,
:parameters => Parameter::ZERO)n" +
"}n"
);
PicoContainer pico = buildContainer(script, null,
ASSEMBLY_SCOPE);
assertNotNull(pico.getComponent(ArrayList.class));
assertNotNull(pico.getComponent(HashSet.class));
}
However, I get a CyclicDependencyException much as if I hadn't
specified Parameter.ZERO in the first place. Any clues?
Thanks :)
-Mike (R)