[ BAEL-4339 ] - How to get Junit 4 to ignore a Base Test Class? #11203 (#11204)

* feat: add ignored tests and update run from java

* Revert "feat: add ignored tests and update run from java"

This reverts commit 0a56fa4bf9e29473d04091408c5ce381f2f55f42.

* add ignore package

* fix: remove abstract from rename and ignore

* fix: removes run with and add missing tests
This commit is contained in:
lucaCambi77 2021-09-29 05:49:28 +02:00 committed by GitHub
parent cd3c5e3ee5
commit 8235298f5b
5 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,8 @@
package com.baeldung.ignore;
public abstract class BaseUnitTest {
public void helperMethod() {
}
}

View File

@ -0,0 +1,8 @@
package com.baeldung.ignore;
public class BaseUnitTestHelper {
public void helperMethod() {
}
}

View File

@ -0,0 +1,11 @@
package com.baeldung.ignore;
import org.junit.Test;
public class ExtendedBaseUnitTest extends BaseUnitTest {
@Test
public void whenDoTest_thenAssert() {
}
}

View File

@ -0,0 +1,13 @@
package com.baeldung.ignore;
import org.junit.Ignore;
import org.junit.Test;
@Ignore("Class not ready for tests")
public class IgnoreClassUnitTest {
@Test
public void whenDoTest_thenAssert() {
}
}

View File

@ -0,0 +1,13 @@
package com.baeldung.ignore;
import org.junit.Ignore;
import org.junit.Test;
public class IgnoreMethodUnitTest {
@Ignore("This test method not ready yet")
@Test
public void whenMethodIsIgnored_thenTestsDoNotRun() {
}
}