Commit 9abaf03d6fc6958e78dbb551a6abf02cb373ac2b
1 parent
6b5389eb
Exists in
master
Organização da estrutura dos testes
Showing
22 changed files
with
138 additions
and
137 deletions
Show diff stats
impl/core/src/test/java/br/gov/frameworkdemoiselle/internal/producer/LocaleProducer.java
| @@ -1,51 +0,0 @@ | @@ -1,51 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * Copyright (C) 2010 SERPRO | ||
| 4 | - * ---------------------------------------------------------------------------- | ||
| 5 | - * This file is part of Demoiselle Framework. | ||
| 6 | - * | ||
| 7 | - * Demoiselle Framework is free software; you can redistribute it and/or | ||
| 8 | - * modify it under the terms of the GNU Lesser General Public License version 3 | ||
| 9 | - * as published by the Free Software Foundation. | ||
| 10 | - * | ||
| 11 | - * This program is distributed in the hope that it will be useful, | ||
| 12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | - * GNU General Public License for more details. | ||
| 15 | - * | ||
| 16 | - * You should have received a copy of the GNU Lesser General Public License version 3 | ||
| 17 | - * along with this program; if not, see <http://www.gnu.org/licenses/> | ||
| 18 | - * or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
| 19 | - * Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 20 | - * ---------------------------------------------------------------------------- | ||
| 21 | - * Este arquivo é parte do Framework Demoiselle. | ||
| 22 | - * | ||
| 23 | - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
| 24 | - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
| 25 | - * do Software Livre (FSF). | ||
| 26 | - * | ||
| 27 | - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
| 28 | - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
| 29 | - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
| 30 | - * para maiores detalhes. | ||
| 31 | - * | ||
| 32 | - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
| 33 | - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
| 34 | - * ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
| 35 | - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
| 36 | - */ | ||
| 37 | -package br.gov.frameworkdemoiselle.internal.producer; | ||
| 38 | - | ||
| 39 | -import java.util.Locale; | ||
| 40 | - | ||
| 41 | -import javax.enterprise.inject.Default; | ||
| 42 | -import javax.enterprise.inject.Produces; | ||
| 43 | - | ||
| 44 | -public class LocaleProducer { | ||
| 45 | - | ||
| 46 | - @Default | ||
| 47 | - @Produces | ||
| 48 | - public Locale create() { | ||
| 49 | - return Locale.getDefault(); | ||
| 50 | - } | ||
| 51 | -} |
impl/core/src/test/java/configuration/defaultvalue/ConfigurationDefaultValueTest.java
| @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 46 | import org.junit.Test; | 46 | import org.junit.Test; |
| 47 | import org.junit.runner.RunWith; | 47 | import org.junit.runner.RunWith; |
| 48 | 48 | ||
| 49 | -import util.Tests; | 49 | +import test.Tests; |
| 50 | 50 | ||
| 51 | @RunWith(Arquillian.class) | 51 | @RunWith(Arquillian.class) |
| 52 | public class ConfigurationDefaultValueTest { | 52 | public class ConfigurationDefaultValueTest { |
impl/core/src/test/java/configuration/field/array/ConfigurationArrayFieldTest.java
| @@ -50,7 +50,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -50,7 +50,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 50 | import org.junit.Test; | 50 | import org.junit.Test; |
| 51 | import org.junit.runner.RunWith; | 51 | import org.junit.runner.RunWith; |
| 52 | 52 | ||
| 53 | -import util.Tests; | 53 | +import test.Tests; |
| 54 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; | 54 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; |
| 55 | 55 | ||
| 56 | @RunWith(Arquillian.class) | 56 | @RunWith(Arquillian.class) |
impl/core/src/test/java/configuration/field/clazz/ConfigurationClassFieldTest.java
| @@ -47,7 +47,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -47,7 +47,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 47 | import org.junit.Test; | 47 | import org.junit.Test; |
| 48 | import org.junit.runner.RunWith; | 48 | import org.junit.runner.RunWith; |
| 49 | 49 | ||
| 50 | -import util.Tests; | 50 | +import test.Tests; |
| 51 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; | 51 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; |
| 52 | 52 | ||
| 53 | @RunWith(Arquillian.class) | 53 | @RunWith(Arquillian.class) |
impl/core/src/test/java/configuration/field/custom/ConfigurationCustomFieldTest.java
| @@ -48,7 +48,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -48,7 +48,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 48 | import org.junit.Test; | 48 | import org.junit.Test; |
| 49 | import org.junit.runner.RunWith; | 49 | import org.junit.runner.RunWith; |
| 50 | 50 | ||
| 51 | -import util.Tests; | 51 | +import test.Tests; |
| 52 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; | 52 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; |
| 53 | 53 | ||
| 54 | @RunWith(Arquillian.class) | 54 | @RunWith(Arquillian.class) |
impl/core/src/test/java/configuration/field/ignored/ConfigurationIgnoredFieldTest.java
| @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 46 | import org.junit.Test; | 46 | import org.junit.Test; |
| 47 | import org.junit.runner.RunWith; | 47 | import org.junit.runner.RunWith; |
| 48 | 48 | ||
| 49 | -import util.Tests; | 49 | +import test.Tests; |
| 50 | 50 | ||
| 51 | @RunWith(Arquillian.class) | 51 | @RunWith(Arquillian.class) |
| 52 | public class ConfigurationIgnoredFieldTest { | 52 | public class ConfigurationIgnoredFieldTest { |
impl/core/src/test/java/configuration/field/map/ConfigurationMapFieldTest.java
| @@ -49,7 +49,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -49,7 +49,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 49 | import org.junit.Test; | 49 | import org.junit.Test; |
| 50 | import org.junit.runner.RunWith; | 50 | import org.junit.runner.RunWith; |
| 51 | 51 | ||
| 52 | -import util.Tests; | 52 | +import test.Tests; |
| 53 | 53 | ||
| 54 | @RunWith(Arquillian.class) | 54 | @RunWith(Arquillian.class) |
| 55 | public class ConfigurationMapFieldTest { | 55 | public class ConfigurationMapFieldTest { |
impl/core/src/test/java/configuration/field/named/ConfigurationNamedFieldTest.java
| @@ -47,7 +47,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -47,7 +47,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 47 | import org.junit.Test; | 47 | import org.junit.Test; |
| 48 | import org.junit.runner.RunWith; | 48 | import org.junit.runner.RunWith; |
| 49 | 49 | ||
| 50 | -import util.Tests; | 50 | +import test.Tests; |
| 51 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; | 51 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; |
| 52 | 52 | ||
| 53 | @RunWith(Arquillian.class) | 53 | @RunWith(Arquillian.class) |
impl/core/src/test/java/configuration/field/notnull/ConfigurationNotNullFieldTest.java
| @@ -49,7 +49,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -49,7 +49,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 49 | import org.junit.Test; | 49 | import org.junit.Test; |
| 50 | import org.junit.runner.RunWith; | 50 | import org.junit.runner.RunWith; |
| 51 | 51 | ||
| 52 | -import util.Tests; | 52 | +import test.Tests; |
| 53 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; | 53 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; |
| 54 | 54 | ||
| 55 | @RunWith(Arquillian.class) | 55 | @RunWith(Arquillian.class) |
impl/core/src/test/java/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java
| @@ -49,7 +49,7 @@ import org.junit.BeforeClass; | @@ -49,7 +49,7 @@ import org.junit.BeforeClass; | ||
| 49 | import org.junit.Test; | 49 | import org.junit.Test; |
| 50 | import org.junit.runner.RunWith; | 50 | import org.junit.runner.RunWith; |
| 51 | 51 | ||
| 52 | -import util.Tests; | 52 | +import test.Tests; |
| 53 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; | 53 | import br.gov.frameworkdemoiselle.configuration.ConfigurationException; |
| 54 | 54 | ||
| 55 | @RunWith(Arquillian.class) | 55 | @RunWith(Arquillian.class) |
impl/core/src/test/java/configuration/field/string/ConfigurationStringFieldTest.java
| @@ -47,7 +47,7 @@ import org.junit.BeforeClass; | @@ -47,7 +47,7 @@ import org.junit.BeforeClass; | ||
| 47 | import org.junit.Test; | 47 | import org.junit.Test; |
| 48 | import org.junit.runner.RunWith; | 48 | import org.junit.runner.RunWith; |
| 49 | 49 | ||
| 50 | -import util.Tests; | 50 | +import test.Tests; |
| 51 | 51 | ||
| 52 | @RunWith(Arquillian.class) | 52 | @RunWith(Arquillian.class) |
| 53 | public class ConfigurationStringFieldTest { | 53 | public class ConfigurationStringFieldTest { |
impl/core/src/test/java/configuration/prefix/ConfigurationPrefixTest.java
| @@ -47,7 +47,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -47,7 +47,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 47 | import org.junit.Test; | 47 | import org.junit.Test; |
| 48 | import org.junit.runner.RunWith; | 48 | import org.junit.runner.RunWith; |
| 49 | 49 | ||
| 50 | -import util.Tests; | 50 | +import test.Tests; |
| 51 | 51 | ||
| 52 | @RunWith(Arquillian.class) | 52 | @RunWith(Arquillian.class) |
| 53 | public class ConfigurationPrefixTest { | 53 | public class ConfigurationPrefixTest { |
impl/core/src/test/java/configuration/resource/ConfigurationResourceTest.java
| @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 46 | import org.junit.Test; | 46 | import org.junit.Test; |
| 47 | import org.junit.runner.RunWith; | 47 | import org.junit.runner.RunWith; |
| 48 | 48 | ||
| 49 | -import util.Tests; | 49 | +import test.Tests; |
| 50 | 50 | ||
| 51 | @RunWith(Arquillian.class) | 51 | @RunWith(Arquillian.class) |
| 52 | public class ConfigurationResourceTest { | 52 | public class ConfigurationResourceTest { |
impl/core/src/test/java/configuration/scope/ConfigurationScopeTest.java
| @@ -45,7 +45,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -45,7 +45,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 45 | import org.junit.Test; | 45 | import org.junit.Test; |
| 46 | import org.junit.runner.RunWith; | 46 | import org.junit.runner.RunWith; |
| 47 | 47 | ||
| 48 | -import util.Tests; | 48 | +import test.Tests; |
| 49 | import br.gov.frameworkdemoiselle.util.Beans; | 49 | import br.gov.frameworkdemoiselle.util.Beans; |
| 50 | 50 | ||
| 51 | @RunWith(Arquillian.class) | 51 | @RunWith(Arquillian.class) |
impl/core/src/test/java/security/athentication/ambiguity/AmbiguousAuthenticatorTest.java
| @@ -48,7 +48,7 @@ import org.junit.Test; | @@ -48,7 +48,7 @@ import org.junit.Test; | ||
| 48 | import org.junit.runner.RunWith; | 48 | import org.junit.runner.RunWith; |
| 49 | 49 | ||
| 50 | import security.athentication.custom.CustomAuthenticator; | 50 | import security.athentication.custom.CustomAuthenticator; |
| 51 | -import util.Tests; | 51 | +import test.Tests; |
| 52 | import br.gov.frameworkdemoiselle.DemoiselleException; | 52 | import br.gov.frameworkdemoiselle.DemoiselleException; |
| 53 | import br.gov.frameworkdemoiselle.security.SecurityContext; | 53 | import br.gov.frameworkdemoiselle.security.SecurityContext; |
| 54 | import configuration.resource.ConfigurationResourceTest; | 54 | import configuration.resource.ConfigurationResourceTest; |
impl/core/src/test/java/security/athentication/custom/CustomAuthenticatorTest.java
| @@ -49,7 +49,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -49,7 +49,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 49 | import org.junit.Test; | 49 | import org.junit.Test; |
| 50 | import org.junit.runner.RunWith; | 50 | import org.junit.runner.RunWith; |
| 51 | 51 | ||
| 52 | -import util.Tests; | 52 | +import test.Tests; |
| 53 | import br.gov.frameworkdemoiselle.security.SecurityContext; | 53 | import br.gov.frameworkdemoiselle.security.SecurityContext; |
| 54 | import configuration.resource.ConfigurationResourceTest; | 54 | import configuration.resource.ConfigurationResourceTest; |
| 55 | 55 |
impl/core/src/test/java/security/athentication/selection/SelectedAuthenticatorTest.java
| @@ -48,7 +48,7 @@ import org.junit.runner.RunWith; | @@ -48,7 +48,7 @@ import org.junit.runner.RunWith; | ||
| 48 | 48 | ||
| 49 | import security.athentication.ambiguity.DuplicatedCustomAuthenticator; | 49 | import security.athentication.ambiguity.DuplicatedCustomAuthenticator; |
| 50 | import security.athentication.custom.CustomAuthenticator; | 50 | import security.athentication.custom.CustomAuthenticator; |
| 51 | -import util.Tests; | 51 | +import test.Tests; |
| 52 | import br.gov.frameworkdemoiselle.security.SecurityContext; | 52 | import br.gov.frameworkdemoiselle.security.SecurityContext; |
| 53 | import configuration.resource.ConfigurationResourceTest; | 53 | import configuration.resource.ConfigurationResourceTest; |
| 54 | 54 |
impl/core/src/test/java/security/athentication/undefined/UndefinedAuthenticatorTest.java
| @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | @@ -46,7 +46,7 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 46 | import org.junit.Test; | 46 | import org.junit.Test; |
| 47 | import org.junit.runner.RunWith; | 47 | import org.junit.runner.RunWith; |
| 48 | 48 | ||
| 49 | -import util.Tests; | 49 | +import test.Tests; |
| 50 | import br.gov.frameworkdemoiselle.security.AuthenticationException; | 50 | import br.gov.frameworkdemoiselle.security.AuthenticationException; |
| 51 | import br.gov.frameworkdemoiselle.security.SecurityContext; | 51 | import br.gov.frameworkdemoiselle.security.SecurityContext; |
| 52 | 52 |
| @@ -0,0 +1,51 @@ | @@ -0,0 +1,51 @@ | ||
| 1 | +/* | ||
| 2 | + * Demoiselle Framework | ||
| 3 | + * Copyright (C) 2010 SERPRO | ||
| 4 | + * ---------------------------------------------------------------------------- | ||
| 5 | + * This file is part of Demoiselle Framework. | ||
| 6 | + * | ||
| 7 | + * Demoiselle Framework is free software; you can redistribute it and/or | ||
| 8 | + * modify it under the terms of the GNU Lesser General Public License version 3 | ||
| 9 | + * as published by the Free Software Foundation. | ||
| 10 | + * | ||
| 11 | + * This program is distributed in the hope that it will be useful, | ||
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | + * GNU General Public License for more details. | ||
| 15 | + * | ||
| 16 | + * You should have received a copy of the GNU Lesser General Public License version 3 | ||
| 17 | + * along with this program; if not, see <http://www.gnu.org/licenses/> | ||
| 18 | + * or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
| 19 | + * Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 20 | + * ---------------------------------------------------------------------------- | ||
| 21 | + * Este arquivo é parte do Framework Demoiselle. | ||
| 22 | + * | ||
| 23 | + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
| 24 | + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
| 25 | + * do Software Livre (FSF). | ||
| 26 | + * | ||
| 27 | + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
| 28 | + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
| 29 | + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
| 30 | + * para maiores detalhes. | ||
| 31 | + * | ||
| 32 | + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
| 33 | + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
| 34 | + * ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
| 35 | + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
| 36 | + */ | ||
| 37 | +package test; | ||
| 38 | + | ||
| 39 | +import java.util.Locale; | ||
| 40 | + | ||
| 41 | +import javax.enterprise.inject.Default; | ||
| 42 | +import javax.enterprise.inject.Produces; | ||
| 43 | + | ||
| 44 | +public class LocaleProducer { | ||
| 45 | + | ||
| 46 | + @Default | ||
| 47 | + @Produces | ||
| 48 | + public Locale create() { | ||
| 49 | + return Locale.getDefault(); | ||
| 50 | + } | ||
| 51 | +} |
| @@ -0,0 +1,69 @@ | @@ -0,0 +1,69 @@ | ||
| 1 | +/* | ||
| 2 | + * Demoiselle Framework | ||
| 3 | + * Copyright (C) 2010 SERPRO | ||
| 4 | + * ---------------------------------------------------------------------------- | ||
| 5 | + * This file is part of Demoiselle Framework. | ||
| 6 | + * | ||
| 7 | + * Demoiselle Framework is free software; you can redistribute it and/or | ||
| 8 | + * modify it under the terms of the GNU Lesser General Public License version 3 | ||
| 9 | + * as published by the Free Software Foundation. | ||
| 10 | + * | ||
| 11 | + * This program is distributed in the hope that it will be useful, | ||
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | + * GNU General Public License for more details. | ||
| 15 | + * | ||
| 16 | + * You should have received a copy of the GNU Lesser General Public License version 3 | ||
| 17 | + * along with this program; if not, see <http://www.gnu.org/licenses/> | ||
| 18 | + * or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
| 19 | + * Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 20 | + * ---------------------------------------------------------------------------- | ||
| 21 | + * Este arquivo é parte do Framework Demoiselle. | ||
| 22 | + * | ||
| 23 | + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
| 24 | + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
| 25 | + * do Software Livre (FSF). | ||
| 26 | + * | ||
| 27 | + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
| 28 | + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
| 29 | + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
| 30 | + * para maiores detalhes. | ||
| 31 | + * | ||
| 32 | + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
| 33 | + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
| 34 | + * ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
| 35 | + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
| 36 | + */ | ||
| 37 | +package test; | ||
| 38 | + | ||
| 39 | +import java.io.File; | ||
| 40 | + | ||
| 41 | +import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
| 42 | +import org.jboss.shrinkwrap.api.asset.EmptyAsset; | ||
| 43 | +import org.jboss.shrinkwrap.api.asset.FileAsset; | ||
| 44 | +import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 45 | + | ||
| 46 | +public final class Tests { | ||
| 47 | + | ||
| 48 | + private Tests() { | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public static JavaArchive createDeployment(Class<?> baseClass) { | ||
| 52 | + return createDeployment().addPackages(true, baseClass.getPackage()); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public static JavaArchive createDeployment() { | ||
| 56 | + return ShrinkWrap | ||
| 57 | + .create(JavaArchive.class) | ||
| 58 | + .addClass(LocaleProducer.class) | ||
| 59 | + .addPackages(true, "br") | ||
| 60 | + .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml") | ||
| 61 | + .addAsManifestResource( | ||
| 62 | + new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), | ||
| 63 | + "services/javax.enterprise.inject.spi.Extension"); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public static FileAsset createFileAsset(String pathname) { | ||
| 67 | + return new FileAsset(new File(pathname)); | ||
| 68 | + } | ||
| 69 | +} |
impl/core/src/test/java/util/Tests.java
| @@ -1,68 +0,0 @@ | @@ -1,68 +0,0 @@ | ||
| 1 | -/* | ||
| 2 | - * Demoiselle Framework | ||
| 3 | - * Copyright (C) 2010 SERPRO | ||
| 4 | - * ---------------------------------------------------------------------------- | ||
| 5 | - * This file is part of Demoiselle Framework. | ||
| 6 | - * | ||
| 7 | - * Demoiselle Framework is free software; you can redistribute it and/or | ||
| 8 | - * modify it under the terms of the GNU Lesser General Public License version 3 | ||
| 9 | - * as published by the Free Software Foundation. | ||
| 10 | - * | ||
| 11 | - * This program is distributed in the hope that it will be useful, | ||
| 12 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | - * GNU General Public License for more details. | ||
| 15 | - * | ||
| 16 | - * You should have received a copy of the GNU Lesser General Public License version 3 | ||
| 17 | - * along with this program; if not, see <http://www.gnu.org/licenses/> | ||
| 18 | - * or write to the Free Software Foundation, Inc., 51 Franklin Street, | ||
| 19 | - * Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 20 | - * ---------------------------------------------------------------------------- | ||
| 21 | - * Este arquivo é parte do Framework Demoiselle. | ||
| 22 | - * | ||
| 23 | - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | ||
| 24 | - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | ||
| 25 | - * do Software Livre (FSF). | ||
| 26 | - * | ||
| 27 | - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | ||
| 28 | - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | ||
| 29 | - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | ||
| 30 | - * para maiores detalhes. | ||
| 31 | - * | ||
| 32 | - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | ||
| 33 | - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | ||
| 34 | - * ou escreva para a Fundação do Software Livre (FSF) Inc., | ||
| 35 | - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | ||
| 36 | - */ | ||
| 37 | -package util; | ||
| 38 | - | ||
| 39 | -import java.io.File; | ||
| 40 | - | ||
| 41 | -import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
| 42 | -import org.jboss.shrinkwrap.api.asset.EmptyAsset; | ||
| 43 | -import org.jboss.shrinkwrap.api.asset.FileAsset; | ||
| 44 | -import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
| 45 | - | ||
| 46 | -public final class Tests { | ||
| 47 | - | ||
| 48 | - private Tests() { | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | - public static JavaArchive createDeployment(Class<?> baseClass) { | ||
| 52 | - return createDeployment().addPackages(true, baseClass.getPackage()); | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - public static JavaArchive createDeployment() { | ||
| 56 | - return ShrinkWrap | ||
| 57 | - .create(JavaArchive.class) | ||
| 58 | - .addPackages(true, "br") | ||
| 59 | - .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml") | ||
| 60 | - .addAsManifestResource( | ||
| 61 | - new File("src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension"), | ||
| 62 | - "services/javax.enterprise.inject.spi.Extension"); | ||
| 63 | - } | ||
| 64 | - | ||
| 65 | - public static FileAsset createFileAsset(String pathname) { | ||
| 66 | - return new FileAsset(new File(pathname)); | ||
| 67 | - } | ||
| 68 | -} |
impl/core/src/uml/injection-producer.ucls
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | <operations public="false" package="false" protected="false" private="false"/> | 38 | <operations public="false" package="false" protected="false" private="false"/> |
| 39 | </display> | 39 | </display> |
| 40 | </class> | 40 | </class> |
| 41 | - <class id="5" corner="BOTTOM_RIGHT" language="java" name="br.gov.frameworkdemoiselle.internal.producer.LocaleProducer" | 41 | + <class id="5" corner="BOTTOM_RIGHT" language="java" name="test.LocaleProducer" |
| 42 | project="demoiselle-core" | 42 | project="demoiselle-core" |
| 43 | file="/demoiselle-core/src/main/java/br/gov/frameworkdemoiselle/internal/producer/LocaleProducer.java" | 43 | file="/demoiselle-core/src/main/java/br/gov/frameworkdemoiselle/internal/producer/LocaleProducer.java" |
| 44 | binary="false"> | 44 | binary="false"> |