renamed back to testing-modules, pulled together testing-modules-2 modules into single module

This commit is contained in:
Sjmillington
2019-09-04 18:03:26 +01:00
parent ff871516ee
commit ce9ea390ba
558 changed files with 16 additions and 75 deletions

View File

@@ -0,0 +1,15 @@
package com.baeldung.junitparams;
public class SafeAdditionUtil {
public int safeAdd(int a, int b) {
long result = ((long) a) + b;
if (result > Integer.MAX_VALUE) {
return Integer.MAX_VALUE;
} else if (result < Integer.MIN_VALUE) {
return Integer.MIN_VALUE;
}
return (int) result;
}
}