From ce5342e72241f6a1cdcad5249932c92651dac5e6 Mon Sep 17 00:00:00 2001 From: Cleverson Sacramento Date: Thu, 15 Aug 2013 10:12:18 -0300 Subject: [PATCH] Ajustes no utilitário de testes --- impl/core/src/test/java/test/LocaleProducer.java | 51 --------------------------------------------------- impl/core/src/test/java/test/Tests.java | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 impl/core/src/test/java/test/LocaleProducer.java diff --git a/impl/core/src/test/java/test/LocaleProducer.java b/impl/core/src/test/java/test/LocaleProducer.java deleted file mode 100644 index d324a66..0000000 --- a/impl/core/src/test/java/test/LocaleProducer.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Demoiselle Framework - * Copyright (C) 2010 SERPRO - * ---------------------------------------------------------------------------- - * This file is part of Demoiselle Framework. - * - * Demoiselle Framework is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License version 3 - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License version 3 - * along with this program; if not, see - * or write to the Free Software Foundation, Inc., 51 Franklin Street, - * Fifth Floor, Boston, MA 02110-1301, USA. - * ---------------------------------------------------------------------------- - * Este arquivo é parte do Framework Demoiselle. - * - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação - * do Software Livre (FSF). - * - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português - * para maiores detalhes. - * - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título - * "LICENCA.txt", junto com esse programa. Se não, acesse - * ou escreva para a Fundação do Software Livre (FSF) Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. - */ -package test; - -import java.util.Locale; - -import javax.enterprise.inject.Default; -import javax.enterprise.inject.Produces; - -public class LocaleProducer { - - @Default - @Produces - public Locale create() { - return Locale.getDefault(); - } -} diff --git a/impl/core/src/test/java/test/Tests.java b/impl/core/src/test/java/test/Tests.java index ba96b14..47a1f10 100644 --- a/impl/core/src/test/java/test/Tests.java +++ b/impl/core/src/test/java/test/Tests.java @@ -34,17 +34,24 @@ * ou escreva para a Fundação do Software Livre (FSF) Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. */ + package test; import java.io.File; +import java.util.Locale; + +import javax.enterprise.inject.Default; +import javax.enterprise.inject.Produces; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.FileAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.Ignore; +@Ignore public final class Tests { - public Tests() { + private Tests() { } public static JavaArchive createDeployment(final Class baseClass) { @@ -54,7 +61,7 @@ public final class Tests { public static JavaArchive createDeployment() { return ShrinkWrap .create(JavaArchive.class) - .addClass(LocaleProducer.class) + .addClass(Tests.class) .addPackages(true, "br") .addAsResource(Tests.createFileAsset("src/test/resources/beans.xml"), "beans.xml") .addAsManifestResource( @@ -65,4 +72,10 @@ public final class Tests { public static FileAsset createFileAsset(final String pathname) { return new FileAsset(new File(pathname)); } + + @Default + @Produces + public Locale create() { + return Locale.getDefault(); + } } -- libgit2 0.21.2