Bael 6556 3 (#4382)
* Added parent module on poms that have no parent defined * Removed dependency reduced pom from undertow module * [BAEL-6556] - Next set of renames of testcases * [BAEL-6556] - Next set of renames of testcases * [BAEL-6556] - Next set of renames of testcases * [BAEL-6556] - Next set of renames of testcases
This commit is contained in:
committed by
Grzegorz Piwowarek
parent
cfa5f07c96
commit
7206e64bef
+2
-2
@@ -19,13 +19,13 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
@ExtendWith({ EnvironmentExtension.class, EmployeeDatabaseSetupExtension.class, EmployeeDaoParameterResolver.class })
|
||||
@ExtendWith(LoggingExtension.class)
|
||||
@ExtendWith(IgnoreFileNotFoundExceptionExtension.class)
|
||||
public class EmployeesTest {
|
||||
public class EmployeesUnitTest {
|
||||
|
||||
private EmployeeJdbcDao employeeDao;
|
||||
|
||||
private Logger logger;
|
||||
|
||||
public EmployeesTest(EmployeeJdbcDao employeeDao) {
|
||||
public EmployeesUnitTest(EmployeeJdbcDao employeeDao) {
|
||||
this.employeeDao = employeeDao;
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.junit.runner.RunWith;
|
||||
import com.baeldung.junit5.Greetings;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class GreetingsTest {
|
||||
public class GreetingsUnitTest {
|
||||
|
||||
@Test
|
||||
void whenCallingSayHello_thenReturnHello() {
|
||||
+1
-1
@@ -4,7 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class ExceptionAssertionTest {
|
||||
public class ExceptionAssertionUnitTest {
|
||||
@Test
|
||||
public void whenExceptionThrown_thenAssertionSucceeds() {
|
||||
String test = null;
|
||||
+1
-1
@@ -11,7 +11,7 @@ import com.baeldung.junit5.Greetings;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(classes = { SpringTestConfiguration.class })
|
||||
public class GreetingsSpringTest {
|
||||
public class GreetingsSpringUnitTest {
|
||||
|
||||
@Test
|
||||
void whenCallingSayHello_thenReturnHello() {
|
||||
+3
-3
@@ -5,10 +5,10 @@ import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
import com.baeldung.migration.junit4.categories.Annotations;
|
||||
import com.baeldung.migration.junit4.categories.JUnit4Tests;
|
||||
import com.baeldung.migration.junit4.categories.JUnit4UnitTest;
|
||||
|
||||
@Category(value = { Annotations.class, JUnit4Tests.class })
|
||||
public class AnnotationTestExampleTest {
|
||||
@Category(value = { Annotations.class, JUnit4UnitTest.class })
|
||||
public class AnnotationTestExampleUnitTest {
|
||||
@Test(expected = Exception.class)
|
||||
public void shouldRaiseAnException() throws Exception {
|
||||
throw new Exception("This is my expected exception");
|
||||
+1
-1
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class AssertionsExampleTest {
|
||||
public class AssertionsExampleUnitTest {
|
||||
@Test
|
||||
@Ignore
|
||||
public void shouldFailBecauseTheNumbersAreNotEqualld() {
|
||||
+2
-2
@@ -15,9 +15,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class BeforeAndAfterAnnotationsTest {
|
||||
public class BeforeAndAfterAnnotationsUnitTest {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeAndAfterAnnotationsTest.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeAndAfterAnnotationsUnitTest.class);
|
||||
|
||||
private List<String> list;
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class BeforeClassAndAfterClassAnnotationsTest {
|
||||
public class BeforeClassAndAfterClassAnnotationsUnitTest {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeClassAndAfterClassAnnotationsTest.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeClassAndAfterClassAnnotationsUnitTest.class);
|
||||
|
||||
@BeforeClass
|
||||
public static void setup() {
|
||||
+1
-1
@@ -4,7 +4,7 @@ import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
public class ExceptionAssertionTest {
|
||||
public class ExceptionAssertionUnitTest {
|
||||
|
||||
@Rule
|
||||
public ExpectedException exceptionRule = ExpectedException.none();
|
||||
+1
-1
@@ -5,7 +5,7 @@ import org.junit.Test;
|
||||
|
||||
import com.baeldung.migration.junit4.rules.TraceUnitTestRule;
|
||||
|
||||
public class RuleExampleTest {
|
||||
public class RuleExampleUnitTest {
|
||||
|
||||
@Rule
|
||||
public final TraceUnitTestRule traceRuleTests = new TraceUnitTestRule();
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package com.baeldung.migration.junit4.categories;
|
||||
|
||||
public interface JUnit4Tests {
|
||||
public interface JUnit4UnitTest {
|
||||
|
||||
}
|
||||
+1
-1
@@ -12,7 +12,7 @@ import org.junit.runner.RunWith;
|
||||
@Tag("annotations")
|
||||
@Tag("junit5")
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class AnnotationTestExampleTest {
|
||||
public class AnnotationTestExampleUnitTest {
|
||||
@Test
|
||||
public void shouldRaiseAnException() throws Exception {
|
||||
Assertions.assertThrows(Exception.class, () -> {
|
||||
+1
-1
@@ -10,7 +10,7 @@ import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class AssertionsExampleTest {
|
||||
public class AssertionsExampleUnitTest {
|
||||
@Test
|
||||
@Disabled
|
||||
public void shouldFailBecauseTheNumbersAreNotEqual() {
|
||||
+2
-2
@@ -9,9 +9,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class BeforeAllAndAfterAllAnnotationsTest {
|
||||
public class BeforeAllAndAfterAllAnnotationsUnitTest {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeAllAndAfterAllAnnotationsTest.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeAllAndAfterAllAnnotationsUnitTest.class);
|
||||
|
||||
@BeforeAll
|
||||
public static void setup() {
|
||||
+2
-2
@@ -15,9 +15,9 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
public class BeforeEachAndAfterEachAnnotationsTest {
|
||||
public class BeforeEachAndAfterEachAnnotationsUnitTest {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeEachAndAfterEachAnnotationsTest.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(BeforeEachAndAfterEachAnnotationsUnitTest.class);
|
||||
|
||||
private List<String> list;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import com.baeldung.migration.junit5.extensions.TraceUnitExtension;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(TraceUnitExtension.class)
|
||||
public class RuleExampleTest {
|
||||
public class RuleExampleUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenTracingTests() {
|
||||
+1
-1
@@ -13,7 +13,7 @@ import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@DisplayName("Testing PersonValidator")
|
||||
public class PersonValidatorTest {
|
||||
public class PersonValidatorUnitTest {
|
||||
|
||||
/**
|
||||
* Nested class, uses ExtendWith
|
||||
+1
-1
@@ -7,6 +7,6 @@ import org.junit.runner.RunWith;
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@SelectPackages("com.baeldung")
|
||||
// @SelectClasses({AssertionTest.class, AssumptionTest.class, ExceptionTest.class})
|
||||
public class AllTests {
|
||||
public class AllUnitTest {
|
||||
|
||||
}
|
||||
+1
-1
@@ -11,7 +11,7 @@ import org.mockito.exceptions.base.MockitoAssertionError;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.VerificationCollector;
|
||||
|
||||
public class LazyVerificationTest {
|
||||
public class LazyVerificationUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenLazilyVerified_thenReportsMultipleFailures() {
|
||||
+1
-1
@@ -14,7 +14,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(fullyQualifiedNames = "com.baeldung.powermockito.introduction.LuckyNumberGenerator")
|
||||
public class LuckyNumberGeneratorTest {
|
||||
public class LuckyNumberGeneratorIntegrationTest {
|
||||
|
||||
@Test
|
||||
public final void givenPrivateMethodWithReturn_whenUsingPowerMockito_thenCorrect() throws Exception {
|
||||
+1
-1
@@ -10,7 +10,7 @@ import org.mockito.Mockito;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
|
||||
|
||||
public class BDDMockitoTest {
|
||||
public class BDDMockitoIntegrationTest {
|
||||
|
||||
PhoneBookService phoneBookService;
|
||||
PhoneBookRepository phoneBookRepository;
|
||||
+1
-1
@@ -11,7 +11,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.core.StringEndsWith.endsWith;
|
||||
import static org.hamcrest.core.StringStartsWith.startsWith;
|
||||
|
||||
public class HamcrestCoreMatchersTest {
|
||||
public class HamcrestCoreMatchersUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenTestInput_WhenUsingIsForMatch() {
|
||||
+1
-1
@@ -11,7 +11,7 @@ import org.mockito.stubbing.Answer;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class MockitoVoidMethodsTest {
|
||||
public class MockitoVoidMethodsUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenAddCalledVerified() {
|
||||
+1
-1
@@ -11,7 +11,7 @@ import java.util.NoSuchElementException;
|
||||
import static org.easymock.EasyMock.*;
|
||||
|
||||
@RunWith(EasyMockRunner.class)
|
||||
public class BaeldungReaderAnnotatedTest {
|
||||
public class BaeldungReaderAnnotatedUnitTest {
|
||||
|
||||
@Mock ArticleReader mockArticleReader;
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import java.util.NoSuchElementException;
|
||||
|
||||
import static org.easymock.EasyMock.*;
|
||||
|
||||
public class BaeldungReaderAnnotatedWithRuleTest {
|
||||
public class BaeldungReaderAnnotatedWithRuleUnitTest {
|
||||
|
||||
@Rule public EasyMockRule mockRule = new EasyMockRule(this);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import org.junit.*;
|
||||
|
||||
import static org.easymock.EasyMock.*;
|
||||
|
||||
public class BaeldungReaderMockDelegationTest {
|
||||
public class BaeldungReaderMockDelegationUnitTest {
|
||||
|
||||
EasyMockSupport easyMockSupport = new EasyMockSupport();
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(EasyMockRunner.class)
|
||||
public class BaeldungReaderMockSupportTest extends EasyMockSupport {
|
||||
public class BaeldungReaderMockSupportUnitTest extends EasyMockSupport {
|
||||
|
||||
@TestSubject BaeldungReader baeldungReader = new BaeldungReader();
|
||||
@Mock ArticleReader mockArticleReader;
|
||||
+1
-1
@@ -7,7 +7,7 @@ import java.util.NoSuchElementException;
|
||||
import static org.easymock.EasyMock.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class BaeldungReaderTest {
|
||||
public class BaeldungReaderUnitTest {
|
||||
|
||||
private BaeldungReader baeldungReader;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import org.junit.runner.RunWith;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
@RunWith(JukitoRunner.class)
|
||||
public class CalculatorTest {
|
||||
public class CalculatorUnitTest {
|
||||
|
||||
public static class Module extends JukitoModule {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class AdditionTest {
|
||||
public class AdditionUnitTest {
|
||||
Calculator calculator = new Calculator();
|
||||
|
||||
@Test
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.junit.runners.JUnit4;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(JUnit4.class)
|
||||
public class CalculatorTest {
|
||||
public class CalculatorUnitTest {
|
||||
Calculator calculator = new Calculator();
|
||||
|
||||
@Test
|
||||
+1
-1
@@ -4,7 +4,7 @@ import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class SubstractionTest {
|
||||
public class SubstractionUnitTest {
|
||||
Calculator calculator = new Calculator();
|
||||
|
||||
@Test
|
||||
+3
-3
@@ -6,7 +6,7 @@ import org.junit.runners.Suite.SuiteClasses;
|
||||
|
||||
@RunWith(Suite.class)
|
||||
@SuiteClasses({
|
||||
AdditionTest.class,
|
||||
SubstractionTest.class})
|
||||
public class SuiteTest {
|
||||
AdditionUnitTest.class,
|
||||
SubstractionUnitTest.class})
|
||||
public class SuiteUnitTest {
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.junit.runner.RunWith;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(JUnitParamsRunner.class)
|
||||
public class SafeAdditionUtilTest {
|
||||
public class SafeAdditionUtilUnitTest {
|
||||
|
||||
private SafeAdditionUtil serviceUnderTest = new SafeAdditionUtil();
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.insightfullogic.lambdabehave.generators.SourceGenerator;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(JunitSuiteRunner.class)
|
||||
public class CalculatorTest {
|
||||
public class CalculatorUnitTest {
|
||||
|
||||
private Calculator calculator;
|
||||
|
||||
Reference in New Issue
Block a user