Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2260 1c488680-804c-0410-94cd-c6b725194a0e
- Loading branch information
Showing
10 changed files
with
110 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../test/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jboss.webbeans.test.unit.implementation.producer.method; | ||
|
||
import javax.annotation.Named; | ||
import javax.inject.Produces; | ||
|
||
public class NamedProducer | ||
{ | ||
@Named("itoen") | ||
@Produces | ||
public String[] createName() | ||
{ | ||
return new String[] { "oh", "otya" }; | ||
} | ||
|
||
@Named("iemon") | ||
@Produces | ||
public String[] createName2() | ||
{ | ||
return new String[] { "fukujyuen", "iemon", "otya" }; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...t/java/org/jboss/webbeans/test/unit/implementation/producer/method/NamedProducerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.jboss.webbeans.test.unit.implementation.producer.method; | ||
|
||
import org.jboss.testharness.impl.packaging.Artifact; | ||
import org.jboss.webbeans.test.unit.AbstractWebBeansTest; | ||
import org.testng.annotations.Test; | ||
|
||
@Artifact | ||
public class NamedProducerTest extends AbstractWebBeansTest | ||
{ | ||
@Test | ||
public void testNamedProducer() | ||
{ | ||
String[] iemon = (String[]) manager.getInstanceByName("iemon"); | ||
assert iemon.length == 3; | ||
String[] itoen = (String[]) manager.getInstanceByName("itoen"); | ||
assert itoen.length == 2; | ||
} | ||
|
||
} |