Commit 2c550250ac35636748a19d6a4b99bdd40b228c7d

Authored by Ednara Oliveira
1 parent 20b7efae
Exists in master

Testes de Exceção

impl/core/src/test/java/exception/MultiExceptionTest.java
@@ -46,7 +46,7 @@ public class MultiExceptionTest { @@ -46,7 +46,7 @@ public class MultiExceptionTest {
46 public void testMultiExceptionHandler() { 46 public void testMultiExceptionHandler() {
47 multiException.throwTwoException(); 47 multiException.throwTwoException();
48 assertEquals(true, multiException.isNullPointerExceptionHandler()); 48 assertEquals(true, multiException.isNullPointerExceptionHandler());
49 - assertEquals(true, multiException.isArithmeticExceptionHandler()); 49 + assertEquals(false, multiException.isArithmeticExceptionHandler());
50 } 50 }
51 51
52 @Test 52 @Test
impl/core/src/test/java/exception/MultiStrategyExceptionHandler.java
@@ -31,16 +31,6 @@ public class MultiStrategyExceptionHandler { @@ -31,16 +31,6 @@ public class MultiStrategyExceptionHandler {
31 } 31 }
32 32
33 @SuppressWarnings("unused") 33 @SuppressWarnings("unused")
34 - public void exceptionMultiStrategyHandlerInTry() {  
35 - try {  
36 - txt.toString();  
37 - int result = 4 / 0;  
38 - } catch (ArithmeticException e) {  
39 - exceptionTryCacth = true;  
40 - }  
41 - }  
42 -  
43 - @SuppressWarnings("unused")  
44 public void exceptionMultiStrategyHandlerAndTry() { 34 public void exceptionMultiStrategyHandlerAndTry() {
45 txt.toString(); 35 txt.toString();
46 try { 36 try {
impl/core/src/test/java/exception/MultiStrategyExceptionHandlerTest.java
@@ -32,16 +32,9 @@ public class MultiStrategyExceptionHandlerTest { @@ -32,16 +32,9 @@ public class MultiStrategyExceptionHandlerTest {
32 } 32 }
33 33
34 @Test 34 @Test
35 - public void testExceptionMultiStrategyHandlerInTry() {  
36 - handlerTest.exceptionMultiStrategyHandlerInTry();  
37 - assertEquals(true, handlerTest.isExceptionTryCacth());  
38 - assertEquals(true, handlerTest.isExceptionHandler());  
39 - }  
40 -  
41 - @Test  
42 public void testExceptionMultiStrategyHandlerAndTry() { 35 public void testExceptionMultiStrategyHandlerAndTry() {
43 handlerTest.exceptionMultiStrategyHandlerAndTry(); 36 handlerTest.exceptionMultiStrategyHandlerAndTry();
44 - assertEquals(true, handlerTest.isExceptionTryCacth()); 37 + assertEquals(false, handlerTest.isExceptionTryCacth());
45 assertEquals(true, handlerTest.isExceptionHandler()); 38 assertEquals(true, handlerTest.isExceptionHandler());
46 } 39 }
47 40