From 6e0e58dbaa2551a108c159377af11b7b00368d4f Mon Sep 17 00:00:00 2001 From: Ednara Oliveira Date: Mon, 8 Apr 2013 13:38:46 -0300 Subject: [PATCH] Organização dos pacotes de teste, o pacote "basic" foi dividido em "string" e "primitiveorwrapper" --- impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java | 64 ---------------------------------------------------------------- impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java | 124 ---------------------------------------------------------------------------------------------------------------------------- impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java | 44 -------------------------------------------- impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java | 45 --------------------------------------------- impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java | 45 --------------------------------------------- impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/AbstractPrimitiveOrWrapperFieldConfig.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/PropertiesPrimitiveOrWrapperFieldConfig.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/SystemPrimitiveOrWrapperFieldConfig.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/XMLPrimitiveOrWrapperFieldConfig.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/AbstractStringFieldConfig.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/ConfigurationStringFieldTest.java | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/PropertiesStringFieldConfig.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/SystemBasicFieldConfig.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/XMLStringFieldConfig.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/resources/configuration/field/basic/demoiselle.properties | 39 --------------------------------------- impl/core/src/test/resources/configuration/field/basic/demoiselle.xml | 43 ------------------------------------------- impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties | 37 +++++++++++++++++++++++++++++++++++++ impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml | 41 +++++++++++++++++++++++++++++++++++++++++ impl/core/src/test/resources/configuration/field/string/demoiselle.properties | 37 +++++++++++++++++++++++++++++++++++++ impl/core/src/test/resources/configuration/field/string/demoiselle.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 21 files changed, 736 insertions(+), 404 deletions(-) delete mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java delete mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java delete mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java delete mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java delete mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/AbstractPrimitiveOrWrapperFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/PropertiesPrimitiveOrWrapperFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/SystemPrimitiveOrWrapperFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/XMLPrimitiveOrWrapperFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/AbstractStringFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/ConfigurationStringFieldTest.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/PropertiesStringFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/SystemBasicFieldConfig.java create mode 100644 impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/XMLStringFieldConfig.java delete mode 100644 impl/core/src/test/resources/configuration/field/basic/demoiselle.properties delete mode 100644 impl/core/src/test/resources/configuration/field/basic/demoiselle.xml create mode 100644 impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties create mode 100644 impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml create mode 100644 impl/core/src/test/resources/configuration/field/string/demoiselle.properties create mode 100644 impl/core/src/test/resources/configuration/field/string/demoiselle.xml diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java deleted file mode 100644 index 0d09422..0000000 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java +++ /dev/null @@ -1,64 +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 br.gov.frameworkdemoiselle.configuration.field.basic; - -public abstract class AbstractBasicFieldConfig { - - private int primitiveInteger; - - private Integer wrappedInteger; - - private String stringWithSpace; - - private String stringWithComma; - - public Integer getWrappedInteger() { - return wrappedInteger; - } - - public int getPrimitiveInteger() { - return primitiveInteger; - } - - public String getStringWithSpace() { - return stringWithSpace; - } - - public String getStringWithComma() { - return stringWithComma; - } -} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java deleted file mode 100644 index 1d43f97..0000000 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java +++ /dev/null @@ -1,124 +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 br.gov.frameworkdemoiselle.configuration.field.basic; - -import static junit.framework.Assert.assertEquals; - -import java.io.File; - -import javax.inject.Inject; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.junit.Arquillian; -import org.jboss.shrinkwrap.api.asset.FileAsset; -import org.jboss.shrinkwrap.api.spec.JavaArchive; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; - -import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest; - -@RunWith(Arquillian.class) -public class ConfigurationBasicFieldTest extends AbstractConfigurationTest { - - @Inject - private PropertiesBasicFieldConfig propertiesConfig; - - @Inject - private XMLBasicFieldConfig xmlConfig; - - @Inject - private SystemBasicFieldConfig systemConfig; - - @Deployment - public static JavaArchive createDeployment() { - JavaArchive deployment = createConfigurationDeployment(); - - deployment.addPackages(true, ConfigurationBasicFieldTest.class.getPackage()); - deployment.addAsResource( - new FileAsset(new File("src/test/resources/configuration/field/basic/demoiselle.properties")), - "demoiselle.properties").addAsResource( - new FileAsset(new File("src/test/resources/configuration/field/basic/demoiselle.xml")), - "demoiselle.xml"); - - return deployment; - } - - @BeforeClass - public static void afterClass() { - System.setProperty("primitiveInteger", String.valueOf(1)); - System.setProperty("wrappedInteger", String.valueOf(2)); - System.setProperty("stringWithSpace", String.valueOf("demoiselle framework")); - System.setProperty("stringWithComma", String.valueOf("demoiselle, framework")); - } - - @Test - public void loadPrimitiveInteger() { - int expected = 1; - - assertEquals(expected, systemConfig.getPrimitiveInteger()); - assertEquals(expected, propertiesConfig.getPrimitiveInteger()); - assertEquals(expected, xmlConfig.getPrimitiveInteger()); - } - - @Test - public void loadWrappedInteger() { - Integer expected = 2; - - assertEquals(expected, systemConfig.getWrappedInteger()); - assertEquals(expected, propertiesConfig.getWrappedInteger()); - assertEquals(expected, xmlConfig.getWrappedInteger()); - } - - @Test - public void loadStringWithSpace() { - String expected = "demoiselle framework"; - - assertEquals(expected, systemConfig.getStringWithSpace()); - assertEquals(expected, propertiesConfig.getStringWithSpace()); - assertEquals(expected, xmlConfig.getStringWithSpace()); - } - - @Test - public void loadStringWithComma() { - String expected = "demoiselle, framework"; - - assertEquals(expected, systemConfig.getStringWithComma()); - assertEquals(expected, propertiesConfig.getStringWithComma()); - assertEquals(expected, xmlConfig.getStringWithComma()); - } -} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java deleted file mode 100644 index 844dd4a..0000000 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java +++ /dev/null @@ -1,44 +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 br.gov.frameworkdemoiselle.configuration.field.basic; - -import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; -import br.gov.frameworkdemoiselle.configuration.Configuration; - -@Configuration(type = PROPERTIES) -public class PropertiesBasicFieldConfig extends AbstractBasicFieldConfig { -} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java deleted file mode 100644 index c6fc88d..0000000 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java +++ /dev/null @@ -1,45 +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 br.gov.frameworkdemoiselle.configuration.field.basic; - -import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM; -import br.gov.frameworkdemoiselle.configuration.Configuration; - -@Configuration(type = SYSTEM) -public class SystemBasicFieldConfig extends AbstractBasicFieldConfig { - -} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java deleted file mode 100644 index c5bbf0e..0000000 --- a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java +++ /dev/null @@ -1,45 +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 br.gov.frameworkdemoiselle.configuration.field.basic; - -import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; -import br.gov.frameworkdemoiselle.configuration.Configuration; - -@Configuration(type = XML) -public class XMLBasicFieldConfig extends AbstractBasicFieldConfig { - -} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/AbstractPrimitiveOrWrapperFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/AbstractPrimitiveOrWrapperFieldConfig.java new file mode 100644 index 0000000..6fb1128 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/AbstractPrimitiveOrWrapperFieldConfig.java @@ -0,0 +1,52 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper; + +public abstract class AbstractPrimitiveOrWrapperFieldConfig { + + private int primitiveInteger; + + private Integer wrappedInteger; + + public Integer getWrappedInteger() { + return wrappedInteger; + } + + public int getPrimitiveInteger() { + return primitiveInteger; + } +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java new file mode 100644 index 0000000..2f0be01 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java @@ -0,0 +1,104 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper; + +import static junit.framework.Assert.assertEquals; + +import java.io.File; + +import javax.inject.Inject; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.shrinkwrap.api.asset.FileAsset; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest; + +@RunWith(Arquillian.class) +public class ConfigurationPrimitiveOrWrapperFieldTest extends AbstractConfigurationTest { + + @Inject + private PropertiesPrimitiveOrWrapperFieldConfig propertiesConfig; + + @Inject + private XMLPrimitiveOrWrapperFieldConfig xmlConfig; + + @Inject + private SystemPrimitiveOrWrapperFieldConfig systemConfig; + + @Deployment + public static JavaArchive createDeployment() { + JavaArchive deployment = createConfigurationDeployment(); + + deployment.addPackages(true, ConfigurationPrimitiveOrWrapperFieldTest.class.getPackage()); + deployment.addAsResource( + new FileAsset(new File("src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties")), + "demoiselle.properties").addAsResource( + new FileAsset(new File("src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml")), + "demoiselle.xml"); + + return deployment; + } + + @BeforeClass + public static void afterClass() { + System.setProperty("primitiveInteger", String.valueOf(1)); + System.setProperty("wrappedInteger", String.valueOf(2)); + } + + @Test + public void loadPrimitiveInteger() { + int expected = 1; + + assertEquals(expected, systemConfig.getPrimitiveInteger()); + assertEquals(expected, propertiesConfig.getPrimitiveInteger()); + assertEquals(expected, xmlConfig.getPrimitiveInteger()); + } + + @Test + public void loadWrappedInteger() { + Integer expected = 2; + + assertEquals(expected, systemConfig.getWrappedInteger()); + assertEquals(expected, propertiesConfig.getWrappedInteger()); + assertEquals(expected, xmlConfig.getWrappedInteger()); + } +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/PropertiesPrimitiveOrWrapperFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/PropertiesPrimitiveOrWrapperFieldConfig.java new file mode 100644 index 0000000..8353b35 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/PropertiesPrimitiveOrWrapperFieldConfig.java @@ -0,0 +1,44 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper; + +import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; +import br.gov.frameworkdemoiselle.configuration.Configuration; + +@Configuration(type = PROPERTIES) +public class PropertiesPrimitiveOrWrapperFieldConfig extends AbstractPrimitiveOrWrapperFieldConfig { +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/SystemPrimitiveOrWrapperFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/SystemPrimitiveOrWrapperFieldConfig.java new file mode 100644 index 0000000..58596fa --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/SystemPrimitiveOrWrapperFieldConfig.java @@ -0,0 +1,45 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper; + +import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM; +import br.gov.frameworkdemoiselle.configuration.Configuration; + +@Configuration(type = SYSTEM) +public class SystemPrimitiveOrWrapperFieldConfig extends AbstractPrimitiveOrWrapperFieldConfig { + +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/XMLPrimitiveOrWrapperFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/XMLPrimitiveOrWrapperFieldConfig.java new file mode 100644 index 0000000..1da6bac --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/XMLPrimitiveOrWrapperFieldConfig.java @@ -0,0 +1,45 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper; + +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; +import br.gov.frameworkdemoiselle.configuration.Configuration; + +@Configuration(type = XML) +public class XMLPrimitiveOrWrapperFieldConfig extends AbstractPrimitiveOrWrapperFieldConfig { + +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/AbstractStringFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/AbstractStringFieldConfig.java new file mode 100644 index 0000000..1200669 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/AbstractStringFieldConfig.java @@ -0,0 +1,52 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.string; + +public abstract class AbstractStringFieldConfig { + + private String stringWithSpace; + + private String stringWithComma; + + public String getStringWithSpace() { + return stringWithSpace; + } + + public String getStringWithComma() { + return stringWithComma; + } +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/ConfigurationStringFieldTest.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/ConfigurationStringFieldTest.java new file mode 100644 index 0000000..a0148e6 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/ConfigurationStringFieldTest.java @@ -0,0 +1,104 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.string; + +import static junit.framework.Assert.assertEquals; + +import java.io.File; + +import javax.inject.Inject; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.shrinkwrap.api.asset.FileAsset; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest; + +@RunWith(Arquillian.class) +public class ConfigurationStringFieldTest extends AbstractConfigurationTest { + + @Inject + private PropertiesStringFieldConfig propertiesConfig; + + @Inject + private XMLStringFieldConfig xmlConfig; + + @Inject + private SystemBasicFieldConfig systemConfig; + + @Deployment + public static JavaArchive createDeployment() { + JavaArchive deployment = createConfigurationDeployment(); + + deployment.addPackages(true, ConfigurationStringFieldTest.class.getPackage()); + deployment.addAsResource( + new FileAsset(new File("src/test/resources/configuration/field/string/demoiselle.properties")), + "demoiselle.properties").addAsResource( + new FileAsset(new File("src/test/resources/configuration/field/string/demoiselle.xml")), + "demoiselle.xml"); + + return deployment; + } + + @BeforeClass + public static void afterClass() { + System.setProperty("stringWithSpace", String.valueOf("demoiselle framework")); + System.setProperty("stringWithComma", String.valueOf("demoiselle, framework")); + } + + @Test + public void loadStringWithSpace() { + String expected = "demoiselle framework"; + + assertEquals(expected, systemConfig.getStringWithSpace()); + assertEquals(expected, propertiesConfig.getStringWithSpace()); + assertEquals(expected, xmlConfig.getStringWithSpace()); + } + + @Test + public void loadStringWithComma() { + String expected = "demoiselle, framework"; + + assertEquals(expected, systemConfig.getStringWithComma()); + assertEquals(expected, propertiesConfig.getStringWithComma()); + assertEquals(expected, xmlConfig.getStringWithComma()); + } +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/PropertiesStringFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/PropertiesStringFieldConfig.java new file mode 100644 index 0000000..e7ae0dc --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/PropertiesStringFieldConfig.java @@ -0,0 +1,44 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.string; + +import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; +import br.gov.frameworkdemoiselle.configuration.Configuration; + +@Configuration(type = PROPERTIES) +public class PropertiesStringFieldConfig extends AbstractStringFieldConfig { +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/SystemBasicFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/SystemBasicFieldConfig.java new file mode 100644 index 0000000..b32d901 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/SystemBasicFieldConfig.java @@ -0,0 +1,45 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.string; + +import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM; +import br.gov.frameworkdemoiselle.configuration.Configuration; + +@Configuration(type = SYSTEM) +public class SystemBasicFieldConfig extends AbstractStringFieldConfig { + +} diff --git a/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/XMLStringFieldConfig.java b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/XMLStringFieldConfig.java new file mode 100644 index 0000000..1872c89 --- /dev/null +++ b/impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/XMLStringFieldConfig.java @@ -0,0 +1,45 @@ +/* + * 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 br.gov.frameworkdemoiselle.configuration.field.string; + +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; +import br.gov.frameworkdemoiselle.configuration.Configuration; + +@Configuration(type = XML) +public class XMLStringFieldConfig extends AbstractStringFieldConfig { + +} diff --git a/impl/core/src/test/resources/configuration/field/basic/demoiselle.properties b/impl/core/src/test/resources/configuration/field/basic/demoiselle.properties deleted file mode 100644 index 481339c..0000000 --- a/impl/core/src/test/resources/configuration/field/basic/demoiselle.properties +++ /dev/null @@ -1,39 +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. - -primitiveInteger=1 -wrappedInteger=2 -stringWithSpace=demoiselle framework -stringWithComma=demoiselle, framework diff --git a/impl/core/src/test/resources/configuration/field/basic/demoiselle.xml b/impl/core/src/test/resources/configuration/field/basic/demoiselle.xml deleted file mode 100644 index 91b0cd2..0000000 --- a/impl/core/src/test/resources/configuration/field/basic/demoiselle.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - 1 - 2 - demoiselle framework - demoiselle, framework - diff --git a/impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties b/impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties new file mode 100644 index 0000000..ca65d12 --- /dev/null +++ b/impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties @@ -0,0 +1,37 @@ +# 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. + +primitiveInteger=1 +wrappedInteger=2 \ No newline at end of file diff --git a/impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml b/impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml new file mode 100644 index 0000000..063a689 --- /dev/null +++ b/impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml @@ -0,0 +1,41 @@ + + + + 1 + 2 + diff --git a/impl/core/src/test/resources/configuration/field/string/demoiselle.properties b/impl/core/src/test/resources/configuration/field/string/demoiselle.properties new file mode 100644 index 0000000..302d801 --- /dev/null +++ b/impl/core/src/test/resources/configuration/field/string/demoiselle.properties @@ -0,0 +1,37 @@ +# 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. + +stringWithSpace=demoiselle framework +stringWithComma=demoiselle, framework diff --git a/impl/core/src/test/resources/configuration/field/string/demoiselle.xml b/impl/core/src/test/resources/configuration/field/string/demoiselle.xml new file mode 100644 index 0000000..1f53be0 --- /dev/null +++ b/impl/core/src/test/resources/configuration/field/string/demoiselle.xml @@ -0,0 +1,41 @@ + + + + demoiselle framework + demoiselle, framework + -- libgit2 0.21.2