Commit 104e81f2a33bb6fae29612954fe2b3fa18e71d20

Authored by Cleverson Sacramento
1 parent 9d5f16bb
Exists in master

Ajustes nos testes, inclusão de cabeçalho e formatação do código-fonte

Showing 22 changed files with 790 additions and 94 deletions   Show diff stats
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/AbstractConfigurationTest.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration; 37 package br.gov.frameworkdemoiselle.configuration;
2 38
3 import java.io.File; 39 import java.io.File;
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/array/AbstractArrayFieldConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.array; 37 package br.gov.frameworkdemoiselle.configuration.field.array;
2 38
3 public abstract class AbstractArrayFieldConfig { 39 public abstract class AbstractArrayFieldConfig {
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/array/ConfigurationArrayFieldTest.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.array; 37 package br.gov.frameworkdemoiselle.configuration.field.array;
2 38
3 import static org.junit.Assert.assertArrayEquals; 39 import static org.junit.Assert.assertArrayEquals;
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/array/PropertiesArrayFieldConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.array; 37 package br.gov.frameworkdemoiselle.configuration.field.array;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.basic; 37 package br.gov.frameworkdemoiselle.configuration.field.basic;
2 38
3 public abstract class AbstractBasicFieldConfig { 39 public abstract class AbstractBasicFieldConfig {
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.basic; 37 package br.gov.frameworkdemoiselle.configuration.field.basic;
2 38
3 import static junit.framework.Assert.assertEquals; 39 import static junit.framework.Assert.assertEquals;
@@ -20,10 +56,10 @@ public class ConfigurationBasicFieldTest extends AbstractConfigurationTest { @@ -20,10 +56,10 @@ public class ConfigurationBasicFieldTest extends AbstractConfigurationTest {
20 56
21 @Inject 57 @Inject
22 private PropertiesBasicFieldConfig propertiesConfig; 58 private PropertiesBasicFieldConfig propertiesConfig;
23 - 59 +
24 @Inject 60 @Inject
25 private XMLBasicFieldConfig xmlConfig; 61 private XMLBasicFieldConfig xmlConfig;
26 - 62 +
27 @Inject 63 @Inject
28 private SystemBasicFieldConfig systemConfig; 64 private SystemBasicFieldConfig systemConfig;
29 65
@@ -32,14 +68,15 @@ public class ConfigurationBasicFieldTest extends AbstractConfigurationTest { @@ -32,14 +68,15 @@ public class ConfigurationBasicFieldTest extends AbstractConfigurationTest {
32 JavaArchive deployment = createConfigurationDeployment(); 68 JavaArchive deployment = createConfigurationDeployment();
33 69
34 deployment.addPackages(true, ConfigurationBasicFieldTest.class.getPackage()); 70 deployment.addPackages(true, ConfigurationBasicFieldTest.class.getPackage());
35 - deployment.addAsResource(new FileAsset(new File(  
36 - "src/test/resources/configuration/field/basic/demoiselle.properties")), "demoiselle.properties").  
37 - addAsResource(new FileAsset(new File(  
38 - "src/test/resources/configuration/field/basic/demoiselle.xml")), "demoiselle.xml"); 71 + deployment.addAsResource(
  72 + new FileAsset(new File("src/test/resources/configuration/field/basic/demoiselle.properties")),
  73 + "demoiselle.properties").addAsResource(
  74 + new FileAsset(new File("src/test/resources/configuration/field/basic/demoiselle.xml")),
  75 + "demoiselle.xml");
39 76
40 return deployment; 77 return deployment;
41 } 78 }
42 - 79 +
43 @Test 80 @Test
44 public void loadPrimitiveInteger() { 81 public void loadPrimitiveInteger() {
45 int expected = 1; 82 int expected = 1;
@@ -70,7 +107,7 @@ public class ConfigurationBasicFieldTest extends AbstractConfigurationTest { @@ -70,7 +107,7 @@ public class ConfigurationBasicFieldTest extends AbstractConfigurationTest {
70 assertEquals(expected, xmlConfig.getStringWithSpace()); 107 assertEquals(expected, xmlConfig.getStringWithSpace());
71 } 108 }
72 109
73 - //@Test 110 + // @Test
74 public void loadStringWithComma() { 111 public void loadStringWithComma() {
75 String expected = "demoiselle,framework"; 112 String expected = "demoiselle,framework";
76 System.setProperty("stringWithComma", String.valueOf(expected)); 113 System.setProperty("stringWithComma", String.valueOf(expected));
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.basic; 37 package br.gov.frameworkdemoiselle.configuration.field.basic;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.basic; 37 package br.gov.frameworkdemoiselle.configuration.field.basic;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM;
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.field.basic; 37 package br.gov.frameworkdemoiselle.configuration.field.basic;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/AbstractResourceConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 public abstract class AbstractResourceConfig { 39 public abstract class AbstractResourceConfig {
4 40
5 - private int primitiveInteger;  
6 -  
7 private String string; 41 private String string;
8 42
9 - public int getPrimitiveInteger() {  
10 - return primitiveInteger;  
11 - }  
12 -  
13 - public void setPrimitiveInteger(int primitiveInteger) {  
14 - this.primitiveInteger = primitiveInteger;  
15 - }  
16 -  
17 public String getStringWithComma() { 43 public String getStringWithComma() {
18 return string; 44 return string;
19 } 45 }
20 -  
21 - public void setStringWithComma(String stringWithComma) {  
22 - this.string = stringWithComma;  
23 - }  
24 -}  
25 \ No newline at end of file 46 \ No newline at end of file
  47 +}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/ConfigurationResourceTest.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static junit.framework.Assert.assertEquals; 39 import static junit.framework.Assert.assertEquals;
@@ -16,29 +52,29 @@ import org.junit.runner.RunWith; @@ -16,29 +52,29 @@ import org.junit.runner.RunWith;
16 import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest; 52 import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest;
17 53
18 @RunWith(Arquillian.class) 54 @RunWith(Arquillian.class)
19 -public class ConfigurationResourceTest extends AbstractConfigurationTest{  
20 - 55 +public class ConfigurationResourceTest extends AbstractConfigurationTest {
  56 +
21 @Inject 57 @Inject
22 private PropertiesDefaultFileConfig propDefault; 58 private PropertiesDefaultFileConfig propDefault;
23 - 59 +
24 @Inject 60 @Inject
25 private PropertiesNamedDefaultFileConfig propNamedDefault; 61 private PropertiesNamedDefaultFileConfig propNamedDefault;
26 - 62 +
27 @Inject 63 @Inject
28 private PropertiesNotDefaultFileConfig propNotDefault; 64 private PropertiesNotDefaultFileConfig propNotDefault;
29 - 65 +
30 @Inject 66 @Inject
31 private PropertiesWithoutFileConfig propWithoutFile; 67 private PropertiesWithoutFileConfig propWithoutFile;
32 - 68 +
33 @Inject 69 @Inject
34 private XMLDefaultFileConfig xmlDefault; 70 private XMLDefaultFileConfig xmlDefault;
35 - 71 +
36 @Inject 72 @Inject
37 private XMLNamedDefaultFileConfig xmlNamedDefault; 73 private XMLNamedDefaultFileConfig xmlNamedDefault;
38 - 74 +
39 @Inject 75 @Inject
40 private XMLNotDefaultFileConfig xmlNotDefault; 76 private XMLNotDefaultFileConfig xmlNotDefault;
41 - 77 +
42 @Inject 78 @Inject
43 private XMLWithoutFileConfig xmlWithoutFile; 79 private XMLWithoutFileConfig xmlWithoutFile;
44 80
@@ -47,61 +83,50 @@ public class ConfigurationResourceTest extends AbstractConfigurationTest{ @@ -47,61 +83,50 @@ public class ConfigurationResourceTest extends AbstractConfigurationTest{
47 JavaArchive deployment = createConfigurationDeployment(); 83 JavaArchive deployment = createConfigurationDeployment();
48 84
49 deployment.addPackages(true, ConfigurationResourceTest.class.getPackage()); 85 deployment.addPackages(true, ConfigurationResourceTest.class.getPackage());
50 - deployment.addAsResource(new FileAsset(new File(  
51 - "src/test/resources/configuration/resource/demoiselle.properties")), "demoiselle.properties").  
52 - addAsResource(new FileAsset(new File(  
53 - "src/test/resources/configuration/resource/demoiselle.xml")), "demoiselle.xml").  
54 - addAsResource(new FileAsset(new File(  
55 - "src/test/resources/configuration/resource/resource.properties")), "resource.properties").  
56 - addAsResource(new FileAsset(new File(  
57 - "src/test/resources/configuration/resource/resource.xml")), "resource.xml");  
58 - 86 + deployment
  87 + .addAsResource(
  88 + new FileAsset(new File("src/test/resources/configuration/resource/demoiselle.properties")),
  89 + "demoiselle.properties")
  90 + .addAsResource(new FileAsset(new File("src/test/resources/configuration/resource/demoiselle.xml")),
  91 + "demoiselle.xml")
  92 + .addAsResource(
  93 + new FileAsset(new File("src/test/resources/configuration/resource/resource.properties")),
  94 + "resource.properties")
  95 + .addAsResource(new FileAsset(new File("src/test/resources/configuration/resource/resource.xml")),
  96 + "resource.xml");
  97 +
59 return deployment; 98 return deployment;
60 } 99 }
61 - 100 +
62 @Test 101 @Test
63 - public void loadFromDefaultFile(){  
64 - int expectedInt = 1;  
65 - String expectedString = "demoiselle framework";  
66 -  
67 - assertEquals(expectedInt, propDefault.getPrimitiveInteger());  
68 - assertEquals(expectedString, propDefault.getStringWithComma());  
69 -  
70 - assertEquals(expectedInt, xmlDefault.getPrimitiveInteger());  
71 - assertEquals(expectedString, xmlDefault.getStringWithComma()); 102 + public void loadFromDefaultFile() {
  103 + String expected = "demoiselle";
  104 +
  105 + assertEquals(expected, propDefault.getStringWithComma());
  106 + assertEquals(expected, xmlDefault.getStringWithComma());
72 } 107 }
73 - 108 +
74 @Test 109 @Test
75 - public void loadFromNamedDefaultFile(){  
76 - int expectedInt = 1;  
77 - String expectedString = "demoiselle framework";  
78 -  
79 - assertEquals(expectedInt, propNamedDefault.getPrimitiveInteger());  
80 - assertEquals(expectedString, propNamedDefault.getStringWithComma());  
81 -  
82 - assertEquals(expectedInt, xmlNamedDefault.getPrimitiveInteger());  
83 - assertEquals(expectedString, xmlNamedDefault.getStringWithComma()); 110 + public void loadFromNamedDefaultFile() {
  111 + String expected = "demoiselle";
  112 +
  113 + assertEquals(expected, propNamedDefault.getStringWithComma());
  114 + assertEquals(expected, xmlNamedDefault.getStringWithComma());
84 } 115 }
85 - 116 +
86 @Test 117 @Test
87 - public void loadFromNotDefaultFile(){  
88 - int expectedInt = 2;  
89 - String expectedString = "demoiselle framework from resource";  
90 -  
91 - assertEquals(expectedInt, propNotDefault.getPrimitiveInteger());  
92 - assertEquals(expectedString, propNotDefault.getStringWithComma());  
93 -  
94 - assertEquals(expectedInt, xmlNotDefault.getPrimitiveInteger());  
95 - assertEquals(expectedString, xmlNotDefault.getStringWithComma()); 118 + public void loadFromNotDefaultFile() {
  119 + String expected = "demoiselle";
  120 +
  121 + assertEquals(expected, propNotDefault.getStringWithComma());
  122 + assertEquals(expected, xmlNotDefault.getStringWithComma());
96 } 123 }
97 - 124 +
98 @Test 125 @Test
99 - public void loadFromNonexistentFile(){  
100 - assertEquals(0, propWithoutFile.getPrimitiveInteger());  
101 - assertEquals(null, propWithoutFile.getStringWithComma());  
102 -  
103 - assertEquals(0, xmlWithoutFile.getPrimitiveInteger());  
104 - assertEquals(null, xmlWithoutFile.getStringWithComma()); 126 + public void loadFromNonexistentFile() {
  127 + String expected = null;
  128 +
  129 + assertEquals(expected, propWithoutFile.getStringWithComma());
  130 + assertEquals(expected, xmlWithoutFile.getStringWithComma());
105 } 131 }
106 -  
107 } 132 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/PropertiesDefaultFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 @Configuration(type = PROPERTIES) 42 @Configuration(type = PROPERTIES)
7 -public class PropertiesDefaultFileConfig extends AbstractResourceConfig{ 43 +public class PropertiesDefaultFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/PropertiesNamedDefaultFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 -@Configuration(resource="demoiselle", type = PROPERTIES)  
7 -public class PropertiesNamedDefaultFileConfig extends AbstractResourceConfig{ 42 +@Configuration(resource = "demoiselle", type = PROPERTIES)
  43 +public class PropertiesNamedDefaultFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/PropertiesNotDefaultFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 -@Configuration(resource="resource", type = PROPERTIES)  
7 -public class PropertiesNotDefaultFileConfig extends AbstractResourceConfig{ 42 +@Configuration(resource = "resource", type = PROPERTIES)
  43 +public class PropertiesNotDefaultFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/PropertiesWithoutFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 -@Configuration(resource="nofile", type = PROPERTIES)  
7 -public class PropertiesWithoutFileConfig extends AbstractResourceConfig{ 42 +@Configuration(resource = "nofile", type = PROPERTIES)
  43 +public class PropertiesWithoutFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/XMLDefaultFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 @Configuration(type = XML) 42 @Configuration(type = XML)
7 -public class XMLDefaultFileConfig extends AbstractResourceConfig{ 43 +public class XMLDefaultFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/XMLNamedDefaultFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 -@Configuration(resource="demoiselle", type = XML)  
7 -public class XMLNamedDefaultFileConfig extends AbstractResourceConfig{ 42 +@Configuration(resource = "demoiselle", type = XML)
  43 +public class XMLNamedDefaultFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/XMLNotDefaultFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 -@Configuration(resource="resource", type = XML)  
7 -public class XMLNotDefaultFileConfig extends AbstractResourceConfig{ 42 +@Configuration(resource = "resource", type = XML)
  43 +public class XMLNotDefaultFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/resource/XMLWithoutFileConfig.java
  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 + */
1 package br.gov.frameworkdemoiselle.configuration.resource; 37 package br.gov.frameworkdemoiselle.configuration.resource;
2 38
3 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML; 39 import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
4 import br.gov.frameworkdemoiselle.configuration.Configuration; 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
5 41
6 -@Configuration(resource="nofile", type = XML)  
7 -public class XMLWithoutFileConfig extends AbstractResourceConfig{ 42 +@Configuration(resource = "nofile", type = XML)
  43 +public class XMLWithoutFileConfig extends AbstractResourceConfig {
8 44
9 } 45 }
impl/core/src/test/java/br/gov/frameworkdemoiselle/internal/producer/LocaleProducer.java
  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 + */
1 package br.gov.frameworkdemoiselle.internal.producer; 37 package br.gov.frameworkdemoiselle.internal.producer;
2 38
3 import java.util.Locale; 39 import java.util.Locale;
impl/core/src/test/java/br/gov/frameworkdemoiselle/util/ExceptionsTest.java
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
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 package br.gov.frameworkdemoiselle.util; 37 package br.gov.frameworkdemoiselle.util;
  38 +
38 import static org.junit.Assert.assertFalse; 39 import static org.junit.Assert.assertFalse;
39 import static org.junit.Assert.assertTrue; 40 import static org.junit.Assert.assertTrue;
40 import static org.junit.Assert.fail; 41 import static org.junit.Assert.fail;
impl/core/src/test/java/br/gov/frameworkdemoiselle/util/StringsTest.java
@@ -34,7 +34,6 @@ @@ -34,7 +34,6 @@
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 -  
38 package br.gov.frameworkdemoiselle.util; 37 package br.gov.frameworkdemoiselle.util;
39 38
40 import static org.junit.Assert.assertEquals; 39 import static org.junit.Assert.assertEquals;