Add renamed tests for BAEL-876 (#1822)
* Deleting file AccountHolderUnitTest * Deleting file CyclicDependancyUnitTest * Delete InfiniteRecursionWithTerminationConditionUnitTest * Delete file UnintendedInfiniteRecursionUnitTest * Create .test * Add renamed tests for BAEL-876 * Delete file
This commit is contained in:
parent
c53095a3d7
commit
e8e3234647
|
@ -2,7 +2,7 @@ package com.baeldung.stackoverflowerror;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
public class AccountHolderUnitTest {
|
||||
public class AccountHolderManualTest {
|
||||
@Test(expected = StackOverflowError.class)
|
||||
public void whenInstanciatingAccountHolder_thenThrowsException() {
|
||||
AccountHolder holder = new AccountHolder();
|
|
@ -1,10 +1,9 @@
|
|||
package com.baeldung.stackoverflowerror;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class CyclicDependancyUnitTest {
|
||||
public class CyclicDependancyManualTest {
|
||||
@Test
|
||||
public void whenInstanciatingClassOne_thenThrowsException() {
|
||||
try {
|
|
@ -2,10 +2,9 @@ package com.baeldung.stackoverflowerror;
|
|||
|
||||
import static junit.framework.TestCase.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class InfiniteRecursionWithTerminationConditionUnitTest {
|
||||
public class InfiniteRecursionWithTerminationConditionManualTest {
|
||||
@Test
|
||||
public void givenPositiveIntNoOne_whenCalcFact_thenThrowsException() {
|
||||
int numToCalcFactorial = 1;
|
|
@ -1,29 +1,33 @@
|
|||
package com.baeldung.stackoverflowerror;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class UnintendedInfiniteRecursionUnitTest {
|
||||
public class UnintendedInfiniteRecursionManualTest {
|
||||
@Test(expected = StackOverflowError.class)
|
||||
public void givenPositiveIntNoOne_whenCalFact_thenThrowsException() {
|
||||
int numToCalcFactorial = 1;
|
||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
||||
|
||||
int numToCalcFactorial= 1;
|
||||
UnintendedInfiniteRecursion uir
|
||||
= new UnintendedInfiniteRecursion();
|
||||
|
||||
uir.calculateFactorial(numToCalcFactorial);
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = StackOverflowError.class)
|
||||
public void givenPositiveIntGtOne_whenCalcFact_thenThrowsException() {
|
||||
int numToCalcFactorial = 2;
|
||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
||||
|
||||
int numToCalcFactorial= 2;
|
||||
UnintendedInfiniteRecursion uir
|
||||
= new UnintendedInfiniteRecursion();
|
||||
|
||||
uir.calculateFactorial(numToCalcFactorial);
|
||||
}
|
||||
|
||||
|
||||
@Test(expected = StackOverflowError.class)
|
||||
public void givenNegativeInt_whenCalcFact_thenThrowsException() {
|
||||
int numToCalcFactorial = -1;
|
||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
||||
|
||||
int numToCalcFactorial= -1;
|
||||
UnintendedInfiniteRecursion uir
|
||||
= new UnintendedInfiniteRecursion();
|
||||
|
||||
uir.calculateFactorial(numToCalcFactorial);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue