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;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class AccountHolderUnitTest {
|
public class AccountHolderManualTest {
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void whenInstanciatingAccountHolder_thenThrowsException() {
|
public void whenInstanciatingAccountHolder_thenThrowsException() {
|
||||||
AccountHolder holder = new AccountHolder();
|
AccountHolder holder = new AccountHolder();
|
@ -1,10 +1,9 @@
|
|||||||
package com.baeldung.stackoverflowerror;
|
package com.baeldung.stackoverflowerror;
|
||||||
|
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class CyclicDependancyUnitTest {
|
public class CyclicDependancyManualTest {
|
||||||
@Test
|
@Test
|
||||||
public void whenInstanciatingClassOne_thenThrowsException() {
|
public void whenInstanciatingClassOne_thenThrowsException() {
|
||||||
try {
|
try {
|
@ -2,10 +2,9 @@ package com.baeldung.stackoverflowerror;
|
|||||||
|
|
||||||
import static junit.framework.TestCase.assertEquals;
|
import static junit.framework.TestCase.assertEquals;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class InfiniteRecursionWithTerminationConditionUnitTest {
|
public class InfiniteRecursionWithTerminationConditionManualTest {
|
||||||
@Test
|
@Test
|
||||||
public void givenPositiveIntNoOne_whenCalcFact_thenThrowsException() {
|
public void givenPositiveIntNoOne_whenCalcFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = 1;
|
int numToCalcFactorial = 1;
|
@ -1,29 +1,33 @@
|
|||||||
package com.baeldung.stackoverflowerror;
|
package com.baeldung.stackoverflowerror;
|
||||||
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class UnintendedInfiniteRecursionUnitTest {
|
public class UnintendedInfiniteRecursionManualTest {
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void givenPositiveIntNoOne_whenCalFact_thenThrowsException() {
|
public void givenPositiveIntNoOne_whenCalFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = 1;
|
int numToCalcFactorial= 1;
|
||||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
UnintendedInfiniteRecursion uir
|
||||||
|
= new UnintendedInfiniteRecursion();
|
||||||
|
|
||||||
uir.calculateFactorial(numToCalcFactorial);
|
uir.calculateFactorial(numToCalcFactorial);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void givenPositiveIntGtOne_whenCalcFact_thenThrowsException() {
|
public void givenPositiveIntGtOne_whenCalcFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = 2;
|
int numToCalcFactorial= 2;
|
||||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
UnintendedInfiniteRecursion uir
|
||||||
|
= new UnintendedInfiniteRecursion();
|
||||||
|
|
||||||
uir.calculateFactorial(numToCalcFactorial);
|
uir.calculateFactorial(numToCalcFactorial);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expected = StackOverflowError.class)
|
@Test(expected = StackOverflowError.class)
|
||||||
public void givenNegativeInt_whenCalcFact_thenThrowsException() {
|
public void givenNegativeInt_whenCalcFact_thenThrowsException() {
|
||||||
int numToCalcFactorial = -1;
|
int numToCalcFactorial= -1;
|
||||||
UnintendedInfiniteRecursion uir = new UnintendedInfiniteRecursion();
|
UnintendedInfiniteRecursion uir
|
||||||
|
= new UnintendedInfiniteRecursion();
|
||||||
|
|
||||||
uir.calculateFactorial(numToCalcFactorial);
|
uir.calculateFactorial(numToCalcFactorial);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user