[picocontainer-scm] [5552] java/2.x/trunk/pico/container/src/test/org/picocontainer/monitors/RegexComposerTestCase.java: simpler/better

paul-yCVjj/[email protected]
Newsgroups gmane.comp.java.picocontainer.cvs
Message-ID <[email protected]>
Revision 5552
Author paul
Date 2009-11-01 12:14:26 -0600 (Sun, 01 Nov 2009)

Log Message

simpler/better

Modified Paths

- java/2.x/trunk/pico/container/src/test/org/picocontainer/monitors/RegexComposerTestCase.java

Diff

Modified: java/2.x/trunk/pico/container/src/test/org/picocontainer/monitors/RegexComposerTestCase.java (5551 => 5552)

--- java/2.x/trunk/pico/container/src/test/org/picocontainer/monitors/RegexComposerTestCase.java 2009-11-01 17:21:19 UTC (rev 5551)
+++ java/2.x/trunk/pico/container/src/test/org/picocontainer/monitors/RegexComposerTestCase.java 2009-11-01 18:14:26 UTC (rev 5552)
@@ -30,19 +30,16 @@
pico.addComponent("plum", "Victoria");

List apples = (List) pico.getComponent("apple[1-9]");
- assertEquals(2, apples.size());
- assertEquals("Braeburn", apples.get(0));
- assertEquals("Granny Smith", apples.get(1));
+ assertEquals("[Braeburn, Granny Smith]", apples.toString());
}

-
@Test
public void canReturningDifferentListsForDifferentComposers() {
MutablePicoContainer pico = new DefaultPicoContainer(
- new ComposingMonitor(new RegexComposer("apple[1-9]", "apples"), new RegexComposer("plum", "plums")));
+ new ComposingMonitor(new RegexComposer("apple[1-9]", "apples"), new RegexComposer("plum*", "plums")));
pico.addComponent("apple1", "Braeburn")
.addComponent("apple2", "Granny Smith")
- .addComponent("plum", "Victoria");
+ .addComponent("plumV", "Victoria");
pico.as(USE_NAMES).addComponent(NeedsApples.class)
.as(USE_NAMES).addComponent(NeedsPlums.class);

@@ -52,7 +49,7 @@
}

@Test
- public void nonMatchingCanFallThroughToAnotherConponentMonitor() throws NoSuchMethodException {
+ public void nonMatchingCanFallThroughToAnotherComponentMonitor() throws NoSuchMethodException {

final List<String> apples = new ArrayList<String>();
apples.add("Cox's");

----------

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.