Commit de9a251eee261ebc951814a68fa792c27fda7cae

Authored by Cleverson Sacramento
2 parents daacc597 3129d685
Exists in master

Merge branch '2.4.0' of git@github.com:demoiselle/framework.git into 2.4.0

Showing 27 changed files with 352 additions and 91 deletions   Show diff stats
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/ignored/AbstractIgnoredFieldConfig.java
... ... @@ -41,13 +41,9 @@ import br.gov.frameworkdemoiselle.annotation.Ignore;
41 41 public abstract class AbstractIgnoredFieldConfig {
42 42  
43 43 @Ignore
44   - private int ignoredInt;
  44 + private int ignoredAttribute;
45 45  
46   - public int getIgnoredInt() {
47   - return ignoredInt;
48   - }
49   -
50   - public void setIgnoredInt(int ignoredInt) {
51   - this.ignoredInt = ignoredInt;
  46 + public int getIgnoredAttribute() {
  47 + return ignoredAttribute;
52 48 }
53 49 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/ignored/ConfigurationIgnoredFieldTest.java
... ... @@ -78,11 +78,11 @@ public class ConfigurationIgnoredFieldTest extends AbstractConfigurationTest {
78 78 }
79 79  
80 80 @Test
81   - public void loadIgnoredInt() {
  81 + public void loadIgnoredAttribute() {
82 82 int expected = 0;
83 83  
84   - assertEquals(expected, filledFieldConfig.getIgnoredInt());
85   - assertEquals(expected, noFileConfig.getIgnoredInt());
86   - assertEquals(expected, emptyFieldsConfig.getIgnoredInt());
  84 + assertEquals(expected, filledFieldConfig.getIgnoredAttribute());
  85 + assertEquals(expected, noFileConfig.getIgnoredAttribute());
  86 + assertEquals(expected, emptyFieldsConfig.getIgnoredAttribute());
87 87 }
88 88 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/named/AbstractNamedFieldConfig.java
... ... @@ -41,35 +41,23 @@ import br.gov.frameworkdemoiselle.annotation.Name;
41 41 public abstract class AbstractNamedFieldConfig {
42 42  
43 43 @Name("main.int")
44   - private int intUniqueName;
  44 + private int uniqueNameAttribute;
45 45  
46 46 @Name("nonexistent.property")
47   - private int intNotPresent;
  47 + private int notPresentAttribute;
48 48  
49 49 @Name("attribute.without.file")
50   - private int intNamedWithoutFile;
  50 + private int namedWithoutFileAttribute;
51 51  
52   - public int getIntUniqueName() {
53   - return intUniqueName;
  52 + public int intUniqueNameAttribute() {
  53 + return uniqueNameAttribute;
54 54 }
55 55  
56   - public void setIntUniqueName(int intUniqueName) {
57   - this.intUniqueName = intUniqueName;
  56 + public int intNotPresentAttribute() {
  57 + return notPresentAttribute;
58 58 }
59 59  
60   - public int getIntNotPresent() {
61   - return intNotPresent;
62   - }
63   -
64   - public void setIntNotPresent(int intNotPresent) {
65   - this.intNotPresent = intNotPresent;
66   - }
67   -
68   - public int getIntNamedWithoutFile() {
69   - return intNamedWithoutFile;
70   - }
71   -
72   - public void setIntNamedWithoutFile(int intNamedWithoutFile) {
73   - this.intNamedWithoutFile = intNamedWithoutFile;
  60 + public int intNamedWithoutFileAttribute() {
  61 + return namedWithoutFileAttribute;
74 62 }
75 63 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/named/ConfigurationNamedFieldTest.java
... ... @@ -76,19 +76,19 @@ public class ConfigurationNamedFieldTest extends AbstractConfigurationTest {
76 76  
77 77 @Test
78 78 public void loadNamedConfigFromPropertyWithName() {
79   - assertEquals(1, propertyNamed.getIntUniqueName());
80   - assertEquals(1, xmlNamed.getIntUniqueName());
  79 + assertEquals(1, propertyNamed.intUniqueNameAttribute());
  80 + assertEquals(1, xmlNamed.intUniqueNameAttribute());
81 81 }
82 82  
83 83 @Test
84 84 public void loadNamedConfigFromNonexistentProperty() {
85   - assertEquals(0, propertyNamed.getIntNotPresent());
86   - assertEquals(0, xmlNamed.getIntNotPresent());
  85 + assertEquals(0, propertyNamed.intNotPresentAttribute());
  86 + assertEquals(0, xmlNamed.intNotPresentAttribute());
87 87 }
88 88  
89 89 @Test
90 90 public void loadNamedConfigFromPropertyWithoutField() {
91   - assertEquals(0, propertyNamed.getIntNamedWithoutFile());
92   - assertEquals(0, xmlNamed.getIntNamedWithoutFile());
  91 + assertEquals(0, propertyNamed.intNamedWithoutFileAttribute());
  92 + assertEquals(0, xmlNamed.intNamedWithoutFileAttribute());
93 93 }
94 94 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/AbstractNotNullFieldConfig.java
... ... @@ -41,9 +41,9 @@ import javax.validation.constraints.NotNull;
41 41 public abstract class AbstractNotNullFieldConfig {
42 42  
43 43 @NotNull
44   - private Integer integerNotNull;
  44 + private Integer attibuteNotNull;
45 45  
46   - public Integer getIntegerNotNull() {
47   - return integerNotNull;
  46 + public Integer getAttributeNotNull() {
  47 + return attibuteNotNull;
48 48 }
49 49 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/ConfigurationNotNullFieldTest.java
... ... @@ -59,16 +59,28 @@ import br.gov.frameworkdemoiselle.configuration.ConfigurationException;
59 59 public class ConfigurationNotNullFieldTest extends AbstractConfigurationTest {
60 60  
61 61 @Inject
62   - private PropertyWithFilledFieldConfig filledFieldConfig;
  62 + private PropertyWithFilledFieldConfig propertyFilledFieldConfig;
63 63  
64 64 @Inject
65   - private PropertyWithEmptyFieldConfig emptyFieldsConfig;
  65 + private PropertyWithEmptyFieldConfig propertyEmptyFieldsConfig;
66 66  
67 67 @Inject
68   - private PropertyWithoutNotNullField withoutNotNullField;
  68 + private PropertyWithoutNotNullField propertyWithoutNotNullField;
69 69  
70 70 @Inject
71   - private PropertyWithoutFileConfig noFileConfig;
  71 + private PropertyWithoutFileConfig propertyNoFileConfig;
  72 +
  73 + @Inject
  74 + private XMLWithFilledFieldConfig xmlFilledFieldConfig;
  75 +
  76 + @Inject
  77 + private XMLWithEmptyFieldConfig xmlEmptyFieldsConfig;
  78 +
  79 + @Inject
  80 + private XMLWithoutNotNullField xmlWithoutNotNullField;
  81 +
  82 + @Inject
  83 + private XMLWithoutFileConfig xmlNoFileConfig;
72 84  
73 85 @Deployment
74 86 public static JavaArchive createDeployment() {
... ... @@ -85,22 +97,40 @@ public class ConfigurationNotNullFieldTest extends AbstractConfigurationTest {
85 97 .addAsResource(
86 98 new FileAsset(new File(
87 99 "src/test/resources/configuration/field/notnull/without-field.properties")),
88   - "without-field.properties");
  100 + "without-field.properties")
  101 + .addAsResource(
  102 + new FileAsset(new File("src/test/resources/configuration/field/notnull/demoiselle.xml")),
  103 + "demoiselle.xml")
  104 + .addAsResource(
  105 + new FileAsset(new File("src/test/resources/configuration/field/notnull/empty-field.xml")),
  106 + "empty-field.xml")
  107 + .addAsResource(
  108 + new FileAsset(new File(
  109 + "src/test/resources/configuration/field/notnull/without-field.xml")),
  110 + "without-field.xml");
89 111  
90 112 return deployment;
91 113 }
92 114  
93 115 @Test
94   - public void loadFieldNotNullFromFilledProperty() {
  116 + public void loadFieldNotNullFromFilledFile() {
95 117 Integer expected = 1;
96 118  
97   - assertEquals(expected, filledFieldConfig.getIntegerNotNull());
  119 + assertEquals(expected, propertyFilledFieldConfig.getAttributeNotNull());
  120 + assertEquals(expected, xmlFilledFieldConfig.getAttributeNotNull());
98 121 }
99 122  
100 123 @Test
101 124 public void loadFieldNotNullFromEmptyProperty() {
102 125 try {
103   - emptyFieldsConfig.getIntegerNotNull();
  126 + propertyEmptyFieldsConfig.getAttributeNotNull();
  127 + fail();
  128 + } catch (ConfigurationException cause) {
  129 + Assert.assertEquals(NullPointerException.class, cause.getCause().getClass());
  130 + }
  131 +
  132 + try {
  133 + xmlEmptyFieldsConfig.getAttributeNotNull();
104 134 fail();
105 135 } catch (ConfigurationException cause) {
106 136 Assert.assertEquals(NullPointerException.class, cause.getCause().getClass());
... ... @@ -110,7 +140,14 @@ public class ConfigurationNotNullFieldTest extends AbstractConfigurationTest {
110 140 @Test
111 141 public void loadFieldFromPropertyFileWithoutNotNullField() {
112 142 try {
113   - withoutNotNullField.getIntegerNotNull();
  143 + propertyWithoutNotNullField.getAttributeNotNull();
  144 + fail();
  145 + } catch (ConfigurationException cause) {
  146 + Assert.assertEquals(NullPointerException.class, cause.getCause().getClass());
  147 + }
  148 +
  149 + try {
  150 + xmlWithoutNotNullField.getAttributeNotNull();
114 151 fail();
115 152 } catch (ConfigurationException cause) {
116 153 Assert.assertEquals(NullPointerException.class, cause.getCause().getClass());
... ... @@ -120,7 +157,14 @@ public class ConfigurationNotNullFieldTest extends AbstractConfigurationTest {
120 157 @Test
121 158 public void loadFieldNotNullFromInexistentPropertyFile() {
122 159 try {
123   - noFileConfig.getIntegerNotNull();
  160 + propertyNoFileConfig.getAttributeNotNull();
  161 + fail();
  162 + } catch (ConfigurationException cause) {
  163 + Assert.assertEquals(NullPointerException.class, cause.getCause().getClass());
  164 + }
  165 +
  166 + try {
  167 + xmlNoFileConfig.getAttributeNotNull();
124 168 fail();
125 169 } catch (ConfigurationException cause) {
126 170 Assert.assertEquals(NullPointerException.class, cause.getCause().getClass());
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/PropertyWithoutFileConfig.java
... ... @@ -36,8 +36,9 @@
36 36 */
37 37 package br.gov.frameworkdemoiselle.configuration.field.notnull;
38 38  
  39 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.PROPERTIES;
39 40 import br.gov.frameworkdemoiselle.configuration.Configuration;
40 41  
41   -@Configuration(resource = "nofile")
  42 +@Configuration(resource = "nofile", type = PROPERTIES)
42 43 public class PropertyWithoutFileConfig extends AbstractNotNullFieldConfig {
43 44 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/XMLWithEmptyFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.field.notnull;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(resource = "empty-field", type = XML)
  7 +public class XMLWithEmptyFieldConfig extends AbstractNotNullFieldConfig {
  8 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/XMLWithFilledFieldConfig.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.field.notnull;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(resource = "demoiselle", type = XML)
  7 +public class XMLWithFilledFieldConfig extends AbstractNotNullFieldConfig {
  8 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/XMLWithoutFileConfig.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.field.notnull;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(resource = "nofile", type = XML)
  7 +public class XMLWithoutFileConfig extends AbstractNotNullFieldConfig {
  8 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/notnull/XMLWithoutNotNullField.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.field.notnull;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(resource = "without-field", type = XML)
  7 +public class XMLWithoutNotNullField extends AbstractNotNullFieldConfig {
  8 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/ConfigurationPrefixTest.java
... ... @@ -56,37 +56,57 @@ import br.gov.frameworkdemoiselle.configuration.AbstractConfigurationTest;
56 56 public class ConfigurationPrefixTest extends AbstractConfigurationTest {
57 57  
58 58 @Inject
59   - private ExistentPrefix existentPrefix;
  59 + private PropertyPrefixEndingWithoutDot propertyEndingWithoutDotPrefix;
60 60  
61 61 @Inject
62   - private MissingPrefix missingPrefix;
  62 + private PropertyMissingPrefix propertyMissingPrefix;
63 63  
64 64 @Inject
65   - private PrefixEndingWithDot endingWithDotPrefix;
  65 + private PropertyPrefixEndingWithDot propertyEndingWithDotPrefix;
  66 +
  67 +
  68 + @Inject
  69 + private XMLPrefixEndingWithoutDot xmlEndingWithoutDotPrefix;
  70 +
  71 + @Inject
  72 + private XMLMissingPrefix xmlMissingPrefix;
  73 +
  74 + @Inject
  75 + private XMLPrefixEndingWithDot xmlEndingWithDotPrefix;
66 76  
67 77 @Deployment
68 78 public static JavaArchive createDeployment() {
69 79 JavaArchive deployment = createConfigurationDeployment();
70 80  
71 81 deployment.addPackages(true, ConfigurationPrefixTest.class.getPackage());
72   - deployment.addAsResource(new FileAsset(
73   - new File("src/test/resources/configuration/prefix/demoiselle.properties")), "demoiselle.properties");
  82 + deployment.addAsResource(
  83 + new FileAsset(new File("src/test/resources/configuration/prefix/demoiselle.properties")),
  84 + "demoiselle.properties").addAsResource(
  85 + new FileAsset(new File("src/test/resources/configuration/prefix/demoiselle.xml")),
  86 + "demoiselle.xml");
74 87  
75 88 return deployment;
76 89 }
77 90  
78 91 @Test
79 92 public void loadFromPrefixedExistentProperty() {
80   - assertEquals("with prefix", existentPrefix.getPrefixedAttribute());
  93 + String expected = "prefix ending without dot";
  94 +
  95 + assertEquals(expected, propertyEndingWithoutDotPrefix.getPrefixedAttribute());
  96 + assertEquals(expected, xmlEndingWithoutDotPrefix.getPrefixedAttribute());
81 97 }
82 98  
83 99 @Test
84 100 public void loadFromPrefixedWithouPrefixOnProperty() {
85   - assertNull(missingPrefix.getPrefixedAttribute());
  101 + assertNull(propertyMissingPrefix.getPrefixedAttribute());
  102 + assertNull(xmlMissingPrefix.getPrefixedAttribute());
86 103 }
87 104  
88 105 @Test
89 106 public void loadPrefixEndingWithDot() {
90   - assertEquals("prefix ending with dot", endingWithDotPrefix.getPrefixedAttribute());
  107 + String expected = "prefix ending with dot";
  108 +
  109 + assertEquals(expected, propertyEndingWithDotPrefix.getPrefixedAttribute());
  110 + assertEquals(expected, propertyEndingWithDotPrefix.getPrefixedAttribute());
91 111 }
92 112 }
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/ExistentPrefix.java
... ... @@ -1,7 +0,0 @@
1   -package br.gov.frameworkdemoiselle.configuration.prefix;
2   -
3   -import br.gov.frameworkdemoiselle.configuration.Configuration;
4   -
5   -@Configuration(prefix = "prefix")
6   -public class ExistentPrefix extends AbstractPrefixConfig {
7   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/MissingPrefix.java
... ... @@ -1,7 +0,0 @@
1   -package br.gov.frameworkdemoiselle.configuration.prefix;
2   -
3   -import br.gov.frameworkdemoiselle.configuration.Configuration;
4   -
5   -@Configuration(prefix = "missing.prefix")
6   -public class MissingPrefix extends AbstractPrefixConfig {
7   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/PrefixEndingWithDot.java
... ... @@ -1,7 +0,0 @@
1   -package br.gov.frameworkdemoiselle.configuration.prefix;
2   -
3   -import br.gov.frameworkdemoiselle.configuration.Configuration;
4   -
5   -@Configuration(prefix = "endingWithDot.")
6   -public class PrefixEndingWithDot extends AbstractPrefixConfig {
7   -}
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/PropertyMissingPrefix.java 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +package br.gov.frameworkdemoiselle.configuration.prefix;
  2 +
  3 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  4 +
  5 +@Configuration(prefix = "missing.prefix")
  6 +public class PropertyMissingPrefix extends AbstractPrefixConfig {
  7 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/PropertyPrefixEndingWithDot.java 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +package br.gov.frameworkdemoiselle.configuration.prefix;
  2 +
  3 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  4 +
  5 +@Configuration(prefix = "endingWithDot.")
  6 +public class PropertyPrefixEndingWithDot extends AbstractPrefixConfig {
  7 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/PropertyPrefixEndingWithoutDot.java 0 → 100644
... ... @@ -0,0 +1,7 @@
  1 +package br.gov.frameworkdemoiselle.configuration.prefix;
  2 +
  3 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  4 +
  5 +@Configuration(prefix = "prefix")
  6 +public class PropertyPrefixEndingWithoutDot extends AbstractPrefixConfig {
  7 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/XMLMissingPrefix.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.prefix;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(type = XML, prefix = "missing.prefix")
  7 +public class XMLMissingPrefix extends AbstractPrefixConfig {
  8 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/XMLPrefixEndingWithDot.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.prefix;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(type = XML, prefix = "endingWithDot.")
  7 +public class XMLPrefixEndingWithDot extends AbstractPrefixConfig {
  8 +}
... ...
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/prefix/XMLPrefixEndingWithoutDot.java 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +package br.gov.frameworkdemoiselle.configuration.prefix;
  2 +
  3 +import static br.gov.frameworkdemoiselle.configuration.ConfigType.XML;
  4 +import br.gov.frameworkdemoiselle.configuration.Configuration;
  5 +
  6 +@Configuration(type = XML, prefix = "prefix")
  7 +public class XMLPrefixEndingWithoutDot extends AbstractPrefixConfig {
  8 +}
... ...
impl/core/src/test/resources/configuration/field/notnull/demoiselle.properties
... ... @@ -33,12 +33,4 @@
33 33 # ou escreva para a Fundação do Software Livre (FSF) Inc.,
34 34 # 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
35 35  
36   -integerNotNull=1
37   -byteNotNull=2
38   -shortNotNull=3
39   -intNotNull=4
40   -longNotNull=5
41   -charNotNull=a
42   -floatNotNull=6.6
43   -doubleNotNull=7.7
44   -booleanNotNull=true
  36 +attibuteNotNull=1
... ...
impl/core/src/test/resources/configuration/field/notnull/demoiselle.xml 0 → 100644
... ... @@ -0,0 +1,40 @@
  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 +<configurations>
  39 + <attibuteNotNull>1</attibuteNotNull>
  40 +</configurations>
... ...
impl/core/src/test/resources/configuration/field/notnull/empty-field.xml 0 → 100644
... ... @@ -0,0 +1,39 @@
  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 +<configurations>
  38 + <integerNotNull></integerNotNull>
  39 +</configurations>
... ...
impl/core/src/test/resources/configuration/field/notnull/without-field.xml 0 → 100644
... ... @@ -0,0 +1,39 @@
  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 +<configurations>
  38 + <propertyNotNull>1</propertyNotNull>
  39 +</configurations>
... ...
impl/core/src/test/resources/configuration/prefix/demoiselle.properties
... ... @@ -33,6 +33,6 @@
33 33 # ou escreva para a Fundação do Software Livre (FSF) Inc.,
34 34 # 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA.
35 35  
36   -prefix.prefixedAttribute=with prefix
  36 +prefix.prefixedAttribute=prefix ending without dot
37 37 prefixedAttribute=without prefix
38 38 endingWithDot.prefixedAttribute=prefix ending with dot
... ...
impl/core/src/test/resources/configuration/prefix/demoiselle.xml 0 → 100644
... ... @@ -0,0 +1,46 @@
  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 + <prefix>
  40 + <prefixedAttribute>prefix ending without dot</prefixedAttribute>
  41 + </prefix>
  42 + <prefixedAttribute>without prefix</prefixedAttribute>
  43 + <endingWithDot>
  44 + <prefixedAttribute>prefix ending with dot</prefixedAttribute>
  45 + </endingWithDot>
  46 +</configuration>
... ...