Commit 6e0e58dbaa2551a108c159377af11b7b00368d4f

Authored by Ednara Oliveira
1 parent b492e67c
Exists in master

Organização dos pacotes de teste, o pacote "basic" foi dividido em

"string" e "primitiveorwrapper"
Showing 21 changed files with 736 additions and 404 deletions   Show diff stats
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/AbstractBasicFieldConfig.java
... ... @@ -1,64 +0,0 @@
1   -/*
2   - * Demoiselle Framework
3   - * Copyright (C) 2010 SERPRO
4   - * ----------------------------------------------------------------------------
5   - * This file is part of Demoiselle Framework.
6   - *
7   - * Demoiselle Framework is free software; you can redistribute it and/or
8   - * modify it under the terms of the GNU Lesser General Public License version 3
9   - * as published by the Free Software Foundation.
10   - *
11   - * This program is distributed in the hope that it will be useful,
12   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - * GNU General Public License for more details.
15   - *
16   - * You should have received a copy of the GNU Lesser General Public License version 3
17   - * along with this program; if not, see <http://www.gnu.org/licenses/>
18   - * or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - * Fifth Floor, Boston, MA 02110-1301, USA.
20   - * ----------------------------------------------------------------------------
21   - * Este arquivo é parte do Framework Demoiselle.
22   - *
23   - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - * do Software Livre (FSF).
26   - *
27   - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - * para maiores detalhes.
31   - *
32   - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
34   - * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   - */
37   -package br.gov.frameworkdemoiselle.configuration.field.basic;
38   -
39   -public abstract class AbstractBasicFieldConfig {
40   -
41   - private int primitiveInteger;
42   -
43   - private Integer wrappedInteger;
44   -
45   - private String stringWithSpace;
46   -
47   - private String stringWithComma;
48   -
49   - public Integer getWrappedInteger() {
50   - return wrappedInteger;
51   - }
52   -
53   - public int getPrimitiveInteger() {
54   - return primitiveInteger;
55   - }
56   -
57   - public String getStringWithSpace() {
58   - return stringWithSpace;
59   - }
60   -
61   - public String getStringWithComma() {
62   - return stringWithComma;
63   - }
64   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/ConfigurationBasicFieldTest.java
... ... @@ -1,124 +0,0 @@
1   -/*
2   - * Demoiselle Framework
3   - * Copyright (C) 2010 SERPRO
4   - * ----------------------------------------------------------------------------
5   - * This file is part of Demoiselle Framework.
6   - *
7   - * Demoiselle Framework is free software; you can redistribute it and/or
8   - * modify it under the terms of the GNU Lesser General Public License version 3
9   - * as published by the Free Software Foundation.
10   - *
11   - * This program is distributed in the hope that it will be useful,
12   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - * GNU General Public License for more details.
15   - *
16   - * You should have received a copy of the GNU Lesser General Public License version 3
17   - * along with this program; if not, see <http://www.gnu.org/licenses/>
18   - * or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - * Fifth Floor, Boston, MA 02110-1301, USA.
20   - * ----------------------------------------------------------------------------
21   - * Este arquivo é parte do Framework Demoiselle.
22   - *
23   - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - * do Software Livre (FSF).
26   - *
27   - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - * para maiores detalhes.
31   - *
32   - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
34   - * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   - */
37   -package br.gov.frameworkdemoiselle.configuration.field.basic;
38   -
39   -import static junit.framework.Assert.assertEquals;
40   -
41   -import java.io.File;
42   -
43   -import javax.inject.Inject;
44   -
45   -import org.jboss.arquillian.container.test.api.Deployment;
46   -import org.jboss.arquillian.junit.Arquillian;
47   -import org.jboss.shrinkwrap.api.asset.FileAsset;
48   -import org.jboss.shrinkwrap.api.spec.JavaArchive;
49   -import org.junit.BeforeClass;
50   -import org.junit.Test;
51   -import org.junit.runner.RunWith;
52   -
53   -import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest;
54   -
55   -@RunWith(Arquillian.class)
56   -public class ConfigurationBasicFieldTest extends AbstractConfigurationTest {
57   -
58   - @Inject
59   - private PropertiesBasicFieldConfig propertiesConfig;
60   -
61   - @Inject
62   - private XMLBasicFieldConfig xmlConfig;
63   -
64   - @Inject
65   - private SystemBasicFieldConfig systemConfig;
66   -
67   - @Deployment
68   - public static JavaArchive createDeployment() {
69   - JavaArchive deployment = createConfigurationDeployment();
70   -
71   - deployment.addPackages(true, ConfigurationBasicFieldTest.class.getPackage());
72   - deployment.addAsResource(
73   - new FileAsset(new File("src/test/resources/configuration/field/basic/demoiselle.properties")),
74   - "demoiselle.properties").addAsResource(
75   - new FileAsset(new File("src/test/resources/configuration/field/basic/demoiselle.xml")),
76   - "demoiselle.xml");
77   -
78   - return deployment;
79   - }
80   -
81   - @BeforeClass
82   - public static void afterClass() {
83   - System.setProperty("primitiveInteger", String.valueOf(1));
84   - System.setProperty("wrappedInteger", String.valueOf(2));
85   - System.setProperty("stringWithSpace", String.valueOf("demoiselle framework"));
86   - System.setProperty("stringWithComma", String.valueOf("demoiselle, framework"));
87   - }
88   -
89   - @Test
90   - public void loadPrimitiveInteger() {
91   - int expected = 1;
92   -
93   - assertEquals(expected, systemConfig.getPrimitiveInteger());
94   - assertEquals(expected, propertiesConfig.getPrimitiveInteger());
95   - assertEquals(expected, xmlConfig.getPrimitiveInteger());
96   - }
97   -
98   - @Test
99   - public void loadWrappedInteger() {
100   - Integer expected = 2;
101   -
102   - assertEquals(expected, systemConfig.getWrappedInteger());
103   - assertEquals(expected, propertiesConfig.getWrappedInteger());
104   - assertEquals(expected, xmlConfig.getWrappedInteger());
105   - }
106   -
107   - @Test
108   - public void loadStringWithSpace() {
109   - String expected = "demoiselle framework";
110   -
111   - assertEquals(expected, systemConfig.getStringWithSpace());
112   - assertEquals(expected, propertiesConfig.getStringWithSpace());
113   - assertEquals(expected, xmlConfig.getStringWithSpace());
114   - }
115   -
116   - @Test
117   - public void loadStringWithComma() {
118   - String expected = "demoiselle, framework";
119   -
120   - assertEquals(expected, systemConfig.getStringWithComma());
121   - assertEquals(expected, propertiesConfig.getStringWithComma());
122   - assertEquals(expected, xmlConfig.getStringWithComma());
123   - }
124   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/PropertiesBasicFieldConfig.java
... ... @@ -1,44 +0,0 @@
1   -/*
2   - * Demoiselle Framework
3   - * Copyright (C) 2010 SERPRO
4   - * ----------------------------------------------------------------------------
5   - * This file is part of Demoiselle Framework.
6   - *
7   - * Demoiselle Framework is free software; you can redistribute it and/or
8   - * modify it under the terms of the GNU Lesser General Public License version 3
9   - * as published by the Free Software Foundation.
10   - *
11   - * This program is distributed in the hope that it will be useful,
12   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - * GNU General Public License for more details.
15   - *
16   - * You should have received a copy of the GNU Lesser General Public License version 3
17   - * along with this program; if not, see <http://www.gnu.org/licenses/>
18   - * or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - * Fifth Floor, Boston, MA 02110-1301, USA.
20   - * ----------------------------------------------------------------------------
21   - * Este arquivo é parte do Framework Demoiselle.
22   - *
23   - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - * do Software Livre (FSF).
26   - *
27   - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - * para maiores detalhes.
31   - *
32   - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
34   - * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   - */
37   -package br.gov.frameworkdemoiselle.configuration.field.basic;
38   -
39   -import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
40   -import br.gov.frameworkdemoiselle.configuration.Configuration;
41   -
42   -@Configuration(type = PROPERTIES)
43   -public class PropertiesBasicFieldConfig extends AbstractBasicFieldConfig {
44   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/SystemBasicFieldConfig.java
... ... @@ -1,45 +0,0 @@
1   -/*
2   - * Demoiselle Framework
3   - * Copyright (C) 2010 SERPRO
4   - * ----------------------------------------------------------------------------
5   - * This file is part of Demoiselle Framework.
6   - *
7   - * Demoiselle Framework is free software; you can redistribute it and/or
8   - * modify it under the terms of the GNU Lesser General Public License version 3
9   - * as published by the Free Software Foundation.
10   - *
11   - * This program is distributed in the hope that it will be useful,
12   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - * GNU General Public License for more details.
15   - *
16   - * You should have received a copy of the GNU Lesser General Public License version 3
17   - * along with this program; if not, see <http://www.gnu.org/licenses/>
18   - * or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - * Fifth Floor, Boston, MA 02110-1301, USA.
20   - * ----------------------------------------------------------------------------
21   - * Este arquivo é parte do Framework Demoiselle.
22   - *
23   - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - * do Software Livre (FSF).
26   - *
27   - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - * para maiores detalhes.
31   - *
32   - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
34   - * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   - */
37   -package br.gov.frameworkdemoiselle.configuration.field.basic;
38   -
39   -import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM;
40   -import br.gov.frameworkdemoiselle.configuration.Configuration;
41   -
42   -@Configuration(type = SYSTEM)
43   -public class SystemBasicFieldConfig extends AbstractBasicFieldConfig {
44   -
45   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/basic/XMLBasicFieldConfig.java
... ... @@ -1,45 +0,0 @@
1   -/*
2   - * Demoiselle Framework
3   - * Copyright (C) 2010 SERPRO
4   - * ----------------------------------------------------------------------------
5   - * This file is part of Demoiselle Framework.
6   - *
7   - * Demoiselle Framework is free software; you can redistribute it and/or
8   - * modify it under the terms of the GNU Lesser General Public License version 3
9   - * as published by the Free Software Foundation.
10   - *
11   - * This program is distributed in the hope that it will be useful,
12   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - * GNU General Public License for more details.
15   - *
16   - * You should have received a copy of the GNU Lesser General Public License version 3
17   - * along with this program; if not, see <http://www.gnu.org/licenses/>
18   - * or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - * Fifth Floor, Boston, MA 02110-1301, USA.
20   - * ----------------------------------------------------------------------------
21   - * Este arquivo é parte do Framework Demoiselle.
22   - *
23   - * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - * do Software Livre (FSF).
26   - *
27   - * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - * para maiores detalhes.
31   - *
32   - * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
34   - * ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   - */
37   -package br.gov.frameworkdemoiselle.configuration.field.basic;
38   -
39   -import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
40   -import br.gov.frameworkdemoiselle.configuration.Configuration;
41   -
42   -@Configuration(type = XML)
43   -public class XMLBasicFieldConfig extends AbstractBasicFieldConfig {
44   -
45   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/AbstractPrimitiveOrWrapperFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,52 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper;
  38 +
  39 +public abstract class AbstractPrimitiveOrWrapperFieldConfig {
  40 +
  41 + private int primitiveInteger;
  42 +
  43 + private Integer wrappedInteger;
  44 +
  45 + public Integer getWrappedInteger() {
  46 + return wrappedInteger;
  47 + }
  48 +
  49 + public int getPrimitiveInteger() {
  50 + return primitiveInteger;
  51 + }
  52 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/ConfigurationPrimitiveOrWrapperFieldTest.java 0 → 100644
... ... @@ -0,0 +1,104 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper;
  38 +
  39 +import static junit.framework.Assert.assertEquals;
  40 +
  41 +import java.io.File;
  42 +
  43 +import javax.inject.Inject;
  44 +
  45 +import org.jboss.arquillian.container.test.api.Deployment;
  46 +import org.jboss.arquillian.junit.Arquillian;
  47 +import org.jboss.shrinkwrap.api.asset.FileAsset;
  48 +import org.jboss.shrinkwrap.api.spec.JavaArchive;
  49 +import org.junit.BeforeClass;
  50 +import org.junit.Test;
  51 +import org.junit.runner.RunWith;
  52 +
  53 +import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest;
  54 +
  55 +@RunWith(Arquillian.class)
  56 +public class ConfigurationPrimitiveOrWrapperFieldTest extends AbstractConfigurationTest {
  57 +
  58 + @Inject
  59 + private PropertiesPrimitiveOrWrapperFieldConfig propertiesConfig;
  60 +
  61 + @Inject
  62 + private XMLPrimitiveOrWrapperFieldConfig xmlConfig;
  63 +
  64 + @Inject
  65 + private SystemPrimitiveOrWrapperFieldConfig systemConfig;
  66 +
  67 + @Deployment
  68 + public static JavaArchive createDeployment() {
  69 + JavaArchive deployment = createConfigurationDeployment();
  70 +
  71 + deployment.addPackages(true, ConfigurationPrimitiveOrWrapperFieldTest.class.getPackage());
  72 + deployment.addAsResource(
  73 + new FileAsset(new File("src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties")),
  74 + "demoiselle.properties").addAsResource(
  75 + new FileAsset(new File("src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml")),
  76 + "demoiselle.xml");
  77 +
  78 + return deployment;
  79 + }
  80 +
  81 + @BeforeClass
  82 + public static void afterClass() {
  83 + System.setProperty("primitiveInteger", String.valueOf(1));
  84 + System.setProperty("wrappedInteger", String.valueOf(2));
  85 + }
  86 +
  87 + @Test
  88 + public void loadPrimitiveInteger() {
  89 + int expected = 1;
  90 +
  91 + assertEquals(expected, systemConfig.getPrimitiveInteger());
  92 + assertEquals(expected, propertiesConfig.getPrimitiveInteger());
  93 + assertEquals(expected, xmlConfig.getPrimitiveInteger());
  94 + }
  95 +
  96 + @Test
  97 + public void loadWrappedInteger() {
  98 + Integer expected = 2;
  99 +
  100 + assertEquals(expected, systemConfig.getWrappedInteger());
  101 + assertEquals(expected, propertiesConfig.getWrappedInteger());
  102 + assertEquals(expected, xmlConfig.getWrappedInteger());
  103 + }
  104 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/PropertiesPrimitiveOrWrapperFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,44 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper;
  38 +
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
  40 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  41 +
  42 +@Configuration(type = PROPERTIES)
  43 +public class PropertiesPrimitiveOrWrapperFieldConfig extends AbstractPrimitiveOrWrapperFieldConfig {
  44 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/SystemPrimitiveOrWrapperFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,45 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper;
  38 +
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM;
  40 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  41 +
  42 +@Configuration(type = SYSTEM)
  43 +public class SystemPrimitiveOrWrapperFieldConfig extends AbstractPrimitiveOrWrapperFieldConfig {
  44 +
  45 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/primitiveorwrapper/XMLPrimitiveOrWrapperFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,45 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.primitiveorwrapper;
  38 +
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  40 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  41 +
  42 +@Configuration(type = XML)
  43 +public class XMLPrimitiveOrWrapperFieldConfig extends AbstractPrimitiveOrWrapperFieldConfig {
  44 +
  45 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/AbstractStringFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,52 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.string;
  38 +
  39 +public abstract class AbstractStringFieldConfig {
  40 +
  41 + private String stringWithSpace;
  42 +
  43 + private String stringWithComma;
  44 +
  45 + public String getStringWithSpace() {
  46 + return stringWithSpace;
  47 + }
  48 +
  49 + public String getStringWithComma() {
  50 + return stringWithComma;
  51 + }
  52 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/ConfigurationStringFieldTest.java 0 → 100644
... ... @@ -0,0 +1,104 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.string;
  38 +
  39 +import static junit.framework.Assert.assertEquals;
  40 +
  41 +import java.io.File;
  42 +
  43 +import javax.inject.Inject;
  44 +
  45 +import org.jboss.arquillian.container.test.api.Deployment;
  46 +import org.jboss.arquillian.junit.Arquillian;
  47 +import org.jboss.shrinkwrap.api.asset.FileAsset;
  48 +import org.jboss.shrinkwrap.api.spec.JavaArchive;
  49 +import org.junit.BeforeClass;
  50 +import org.junit.Test;
  51 +import org.junit.runner.RunWith;
  52 +
  53 +import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest;
  54 +
  55 +@RunWith(Arquillian.class)
  56 +public class ConfigurationStringFieldTest extends AbstractConfigurationTest {
  57 +
  58 + @Inject
  59 + private PropertiesStringFieldConfig propertiesConfig;
  60 +
  61 + @Inject
  62 + private XMLStringFieldConfig xmlConfig;
  63 +
  64 + @Inject
  65 + private SystemBasicFieldConfig systemConfig;
  66 +
  67 + @Deployment
  68 + public static JavaArchive createDeployment() {
  69 + JavaArchive deployment = createConfigurationDeployment();
  70 +
  71 + deployment.addPackages(true, ConfigurationStringFieldTest.class.getPackage());
  72 + deployment.addAsResource(
  73 + new FileAsset(new File("src/test/resources/configuration/field/string/demoiselle.properties")),
  74 + "demoiselle.properties").addAsResource(
  75 + new FileAsset(new File("src/test/resources/configuration/field/string/demoiselle.xml")),
  76 + "demoiselle.xml");
  77 +
  78 + return deployment;
  79 + }
  80 +
  81 + @BeforeClass
  82 + public static void afterClass() {
  83 + System.setProperty("stringWithSpace", String.valueOf("demoiselle framework"));
  84 + System.setProperty("stringWithComma", String.valueOf("demoiselle, framework"));
  85 + }
  86 +
  87 + @Test
  88 + public void loadStringWithSpace() {
  89 + String expected = "demoiselle framework";
  90 +
  91 + assertEquals(expected, systemConfig.getStringWithSpace());
  92 + assertEquals(expected, propertiesConfig.getStringWithSpace());
  93 + assertEquals(expected, xmlConfig.getStringWithSpace());
  94 + }
  95 +
  96 + @Test
  97 + public void loadStringWithComma() {
  98 + String expected = "demoiselle, framework";
  99 +
  100 + assertEquals(expected, systemConfig.getStringWithComma());
  101 + assertEquals(expected, propertiesConfig.getStringWithComma());
  102 + assertEquals(expected, xmlConfig.getStringWithComma());
  103 + }
  104 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/PropertiesStringFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,44 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.string;
  38 +
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
  40 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  41 +
  42 +@Configuration(type = PROPERTIES)
  43 +public class PropertiesStringFieldConfig extends AbstractStringFieldConfig {
  44 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/SystemBasicFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,45 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.string;
  38 +
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.SYSTEM;
  40 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  41 +
  42 +@Configuration(type = SYSTEM)
  43 +public class SystemBasicFieldConfig extends AbstractStringFieldConfig {
  44 +
  45 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/string/XMLStringFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,45 @@
  1 +/*
  2 + * Demoiselle Framework
  3 + * Copyright (C) 2010 SERPRO
  4 + * ----------------------------------------------------------------------------
  5 + * This file is part of Demoiselle Framework.
  6 + *
  7 + * Demoiselle Framework is free software; you can redistribute it and/or
  8 + * modify it under the terms of the GNU Lesser General Public License version 3
  9 + * as published by the Free Software Foundation.
  10 + *
  11 + * This program is distributed in the hope that it will be useful,
  12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + * GNU General Public License for more details.
  15 + *
  16 + * You should have received a copy of the GNU Lesser General Public License version 3
  17 + * along with this program; if not, see <http://www.gnu.org/licenses/>
  18 + * or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + * Fifth Floor, Boston, MA 02110-1301, USA.
  20 + * ----------------------------------------------------------------------------
  21 + * Este arquivo é parte do Framework Demoiselle.
  22 + *
  23 + * O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + * do Software Livre (FSF).
  26 + *
  27 + * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + * para maiores detalhes.
  31 + *
  32 + * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  34 + * ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 + */
  37 +package br.gov.frameworkdemoiselle.configuration.field.string;
  38 +
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  40 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  41 +
  42 +@Configuration(type = XML)
  43 +public class XMLStringFieldConfig extends AbstractStringFieldConfig {
  44 +
  45 +}
... ...
impl/core/src/test/resources/configuration/field/basic/demoiselle.properties
... ... @@ -1,39 +0,0 @@
1   -# Demoiselle Framework
2   -# Copyright (C) 2010 SERPRO
3   -# ----------------------------------------------------------------------------
4   -# This file is part of Demoiselle Framework.
5   -#
6   -# Demoiselle Framework is free software; you can redistribute it and/or
7   -# modify it under the terms of the GNU Lesser General Public License version 3
8   -# as published by the Free Software Foundation.
9   -#
10   -# This program is distributed in the hope that it will be useful,
11   -# but WITHOUT ANY WARRANTY; without even the implied warranty of
12   -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13   -# GNU General Public License for more details.
14   -#
15   -# You should have received a copy of the GNU Lesser General Public License version 3
16   -# along with this program; if not, see <http://www.gnu.org/licenses/>
17   -# or write to the Free Software Foundation, Inc., 51 Franklin Street,
18   -# Fifth Floor, Boston, MA 02110-1301, USA.
19   -# ----------------------------------------------------------------------------
20   -# Este arquivo é parte do Framework Demoiselle.
21   -#
22   -# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
23   -# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
24   -# do Software Livre (FSF).
25   -#
26   -# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
27   -# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
28   -# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
29   -# para maiores detalhes.
30   -#
31   -# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
32   -# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
33   -# ou escreva para a Fundação do Software Livre (FSF) Inc.,
34   -# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
35   -
36   -primitiveInteger=1
37   -wrappedInteger=2
38   -stringWithSpace=demoiselle framework
39   -stringWithComma=demoiselle, framework
impl/core/src/test/resources/configuration/field/basic/demoiselle.xml
... ... @@ -1,43 +0,0 @@
1   -<!--
2   - Demoiselle Framework
3   - Copyright (C) 2010 SERPRO
4   - ============================================================================
5   - This file is part of Demoiselle Framework.
6   -
7   - Demoiselle Framework is free software; you can redistribute it and/or
8   - modify it under the terms of the GNU Lesser General Public License version 3
9   - as published by the Free Software Foundation.
10   -
11   - This program is distributed in the hope that it will be useful,
12   - but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - GNU General Public License for more details.
15   -
16   - You should have received a copy of the GNU Lesser General Public License version 3
17   - along with this program; if not, see <http://www.gnu.org/licenses />
18   - or write to the Free Software Foundation, Inc., 51 Franklin Street,
19   - Fifth Floor, Boston, MA 02110-1301, USA.
20   - ============================================================================
21   - Este arquivo é parte do Framework Demoiselle.
22   -
23   - O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
24   - modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
25   - do Software Livre (FSF).
26   -
27   - Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
28   - GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
29   - APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
30   - para maiores detalhes.
31   -
32   - Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
33   - "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
34   - ou escreva para a Fundação do Software Livre (FSF) Inc.,
35   - 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
36   --->
37   -
38   -<configuration>
39   - <primitiveInteger>1</primitiveInteger>
40   - <wrappedInteger>2</wrappedInteger>
41   - <stringWithSpace>demoiselle framework</stringWithSpace>
42   - <stringWithComma>demoiselle, framework</stringWithComma>
43   -</configuration>
impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.properties 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +# Demoiselle Framework
  2 +# Copyright (C) 2010 SERPRO
  3 +# ----------------------------------------------------------------------------
  4 +# This file is part of Demoiselle Framework.
  5 +#
  6 +# Demoiselle Framework is free software; you can redistribute it and/or
  7 +# modify it under the terms of the GNU Lesser General Public License version 3
  8 +# as published by the Free Software Foundation.
  9 +#
  10 +# This program is distributed in the hope that it will be useful,
  11 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13 +# GNU General Public License for more details.
  14 +#
  15 +# You should have received a copy of the GNU Lesser General Public License version 3
  16 +# along with this program; if not, see <http://www.gnu.org/licenses/>
  17 +# or write to the Free Software Foundation, Inc., 51 Franklin Street,
  18 +# Fifth Floor, Boston, MA 02110-1301, USA.
  19 +# ----------------------------------------------------------------------------
  20 +# Este arquivo é parte do Framework Demoiselle.
  21 +#
  22 +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  23 +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  24 +# do Software Livre (FSF).
  25 +#
  26 +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  27 +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  28 +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  29 +# para maiores detalhes.
  30 +#
  31 +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  32 +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  33 +# ou escreva para a Fundação do Software Livre (FSF) Inc.,
  34 +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  35 +
  36 +primitiveInteger=1
  37 +wrappedInteger=2
0 38 \ No newline at end of file
... ...
impl/core/src/test/resources/configuration/field/primitiveorwrapper/demoiselle.xml 0 → 100644
... ... @@ -0,0 +1,41 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses />
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +
  38 +<configuration>
  39 + <primitiveInteger>1</primitiveInteger>
  40 + <wrappedInteger>2</wrappedInteger>
  41 +</configuration>
... ...
impl/core/src/test/resources/configuration/field/string/demoiselle.properties 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +# Demoiselle Framework
  2 +# Copyright (C) 2010 SERPRO
  3 +# ----------------------------------------------------------------------------
  4 +# This file is part of Demoiselle Framework.
  5 +#
  6 +# Demoiselle Framework is free software; you can redistribute it and/or
  7 +# modify it under the terms of the GNU Lesser General Public License version 3
  8 +# as published by the Free Software Foundation.
  9 +#
  10 +# This program is distributed in the hope that it will be useful,
  11 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  12 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13 +# GNU General Public License for more details.
  14 +#
  15 +# You should have received a copy of the GNU Lesser General Public License version 3
  16 +# along with this program; if not, see <http://www.gnu.org/licenses/>
  17 +# or write to the Free Software Foundation, Inc., 51 Franklin Street,
  18 +# Fifth Floor, Boston, MA 02110-1301, USA.
  19 +# ----------------------------------------------------------------------------
  20 +# Este arquivo é parte do Framework Demoiselle.
  21 +#
  22 +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  23 +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  24 +# do Software Livre (FSF).
  25 +#
  26 +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  27 +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  28 +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  29 +# para maiores detalhes.
  30 +#
  31 +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  32 +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/>
  33 +# ou escreva para a Fundação do Software Livre (FSF) Inc.,
  34 +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  35 +
  36 +stringWithSpace=demoiselle framework
  37 +stringWithComma=demoiselle, framework
... ...
impl/core/src/test/resources/configuration/field/string/demoiselle.xml 0 → 100644
... ... @@ -0,0 +1,41 @@
  1 +<!--
  2 + Demoiselle Framework
  3 + Copyright (C) 2010 SERPRO
  4 + ============================================================================
  5 + This file is part of Demoiselle Framework.
  6 +
  7 + Demoiselle Framework is free software; you can redistribute it and/or
  8 + modify it under the terms of the GNU Lesser General Public License version 3
  9 + as published by the Free Software Foundation.
  10 +
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 +
  16 + You should have received a copy of the GNU Lesser General Public License version 3
  17 + along with this program; if not, see <http://www.gnu.org/licenses />
  18 + or write to the Free Software Foundation, Inc., 51 Franklin Street,
  19 + Fifth Floor, Boston, MA 02110-1301, USA.
  20 + ============================================================================
  21 + Este arquivo é parte do Framework Demoiselle.
  22 +
  23 + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou
  24 + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação
  25 + do Software Livre (FSF).
  26 +
  27 + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA
  28 + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou
  29 + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português
  30 + para maiores detalhes.
  31 +
  32 + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título
  33 + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses />
  34 + ou escreva para a Fundação do Software Livre (FSF) Inc.,
  35 + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
  36 +-->
  37 +
  38 +<configuration>
  39 + <stringWithSpace>demoiselle framework</stringWithSpace>
  40 + <stringWithComma>demoiselle, framework</stringWithComma>
  41 +</configuration>
... ...