Commit 5fefbbf2ae0cee51437c0ded5cd34c8e3d633595
1 parent
b2eec6e2
Exists in
master
Testes de erro de conversão
Showing
3 changed files
with
20 additions
and
1 deletions
Show diff stats
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/array/AbstractArrayEmptyFieldConfig.java
| ... | ... | @@ -42,6 +42,8 @@ public abstract class AbstractArrayEmptyFieldConfig { |
| 42 | 42 | |
| 43 | 43 | private Integer[] emptyWrapperIntegers; |
| 44 | 44 | |
| 45 | + private Integer[] errorTypeWrapperIntegers; | |
| 46 | + | |
| 45 | 47 | public Integer[] getEmptyWrapperIntegers() { |
| 46 | 48 | return emptyWrapperIntegers; |
| 47 | 49 | } |
| ... | ... | @@ -49,4 +51,8 @@ public abstract class AbstractArrayEmptyFieldConfig { |
| 49 | 51 | public int[] getEmptyPrimitiveIntegers() { |
| 50 | 52 | return emptyPrimitiveIntegers; |
| 51 | 53 | } |
| 54 | + | |
| 55 | + public Integer[] getErrorTypeWrapperIntegers() { | |
| 56 | + return errorTypeWrapperIntegers; | |
| 57 | + } | |
| 52 | 58 | } | ... | ... |
impl/core/src/test/java/br/gov/frameworkdemoiselle/configuration/field/array/ConfigurationArrayFieldTest.java
| ... | ... | @@ -146,5 +146,15 @@ public class ConfigurationArrayFieldTest extends AbstractConfigurationTest { |
| 146 | 146 | } catch (ConfigurationException cause) { |
| 147 | 147 | assertEquals(ConversionException.class, cause.getCause().getClass()); |
| 148 | 148 | } |
| 149 | - } | |
| 149 | + } | |
| 150 | + | |
| 151 | + @Test | |
| 152 | + public void loadErrorTypeWrapper() { | |
| 153 | + try { | |
| 154 | + propertiesNullConfig.getErrorTypeWrapperIntegers(); | |
| 155 | + Assert.fail(); | |
| 156 | + } catch (ConfigurationException cause) { | |
| 157 | + assertEquals(ConversionException.class, cause.getCause().getClass()); | |
| 158 | + } | |
| 159 | + } | |
| 150 | 160 | } | ... | ... |