[BAEL-9635] - Moved Junit vs TestNg junit code examples to junit-5 module from core-java

This commit is contained in:
amit2103
2018-10-14 18:13:40 +05:30
parent 5a76e44ac1
commit b5dcb13c41
14 changed files with 59 additions and 118 deletions
@@ -1,15 +0,0 @@
package com.baeldung.throwsexception;
public class Calculator {
public double divide(double a, double b) {
if (b == 0) {
throw new DivideByZeroException("Divider cannot be equal to zero!");
}
return a/b;
}
}
@@ -1,9 +0,0 @@
package com.baeldung.throwsexception;
public class DivideByZeroException extends RuntimeException {
public DivideByZeroException(String message) {
super(message);
}
}