Commit ce5342e72241f6a1cdcad5249932c92651dac5e6

Authored by Cleverson Sacramento
1 parent b4c57134
Exists in master

Ajustes no utilitário de testes

impl/core/src/test/java/test/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 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 -}  
impl/core/src/test/java/test/Tests.java
@@ -34,17 +34,24 @@ @@ -34,17 +34,24 @@
34 * ou escreva para a Fundação do Software Livre (FSF) Inc., 34 * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35 * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. 35 * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36 */ 36 */
  37 +
37 package test; 38 package test;
38 39
39 import java.io.File; 40 import java.io.File;
  41 +import java.util.Locale;
  42 +
  43 +import javax.enterprise.inject.Default;
  44 +import javax.enterprise.inject.Produces;
40 45
41 import org.jboss.shrinkwrap.api.ShrinkWrap; 46 import org.jboss.shrinkwrap.api.ShrinkWrap;
42 import org.jboss.shrinkwrap.api.asset.FileAsset; 47 import org.jboss.shrinkwrap.api.asset.FileAsset;
43 import org.jboss.shrinkwrap.api.spec.JavaArchive; 48 import org.jboss.shrinkwrap.api.spec.JavaArchive;
  49 +import org.junit.Ignore;
44 50
  51 +@Ignore
45 public final class Tests { 52 public final class Tests {
46 53
47 - public Tests() { 54 + private Tests() {
48 } 55 }
49 56
50 public static JavaArchive createDeployment(final Class<?> baseClass) { 57 public static JavaArchive createDeployment(final Class<?> baseClass) {
@@ -54,7 +61,7 @@ public final class Tests { @@ -54,7 +61,7 @@ public final class Tests {
54 public static JavaArchive createDeployment() { 61 public static JavaArchive createDeployment() {
55 return ShrinkWrap 62 return ShrinkWrap
56 .create(JavaArchive.class) 63 .create(JavaArchive.class)
57 - .addClass(LocaleProducer.class) 64 + .addClass(Tests.class)
58 .addPackages(true, "br") 65 .addPackages(true, "br")
59 .addAsResource(Tests.createFileAsset("src/test/resources/beans.xml"), "beans.xml") 66 .addAsResource(Tests.createFileAsset("src/test/resources/beans.xml"), "beans.xml")
60 .addAsManifestResource( 67 .addAsManifestResource(
@@ -65,4 +72,10 @@ public final class Tests { @@ -65,4 +72,10 @@ public final class Tests {
65 public static FileAsset createFileAsset(final String pathname) { 72 public static FileAsset createFileAsset(final String pathname) {
66 return new FileAsset(new File(pathname)); 73 return new FileAsset(new File(pathname));
67 } 74 }
  75 +
  76 + @Default
  77 + @Produces
  78 + public Locale create() {
  79 + return Locale.getDefault();
  80 + }
68 } 81 }