Commit 694d39c95d941bb806cf58ba7130349b9dab72dc
1 parent
931be89f
Exists in
master
Refatoração dos nomes dos atributo e métodos da classe
AbstractNameFieldConfig
Showing
2 changed files
with
15 additions
and
27 deletions
Show diff stats
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 | } | ... | ... |