这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions testing-modules/junit-5-basics-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter-api.version}</version>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -46,9 +46,4 @@
</plugins>
</build>

<properties>
<junit-jupiter-api.version>5.10.0</junit-jupiter-api.version>
<junit-jupiter.version>5.10.3</junit-jupiter.version> <!-- Upgrade to latest breaks tests -->
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.baeldung.junit.norunnablemethods;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

public class JUnit4IgnoreUnitTest {

@Ignore
@Test
public void whenMethodIsIgnored_thenTestsDoNotRun() {
Assert.assertTrue(true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.baeldung.junit.norunnablemethods;

/**
* This class is actually a utility/helper class, but it is incorrectly named
* ending in Test, that can be misinterpreted as a real Test class
*
* @see @NameUtilTestHelper with a name that avoids this problem
*/
public class NameUtilTest {

public String formatName(String name) {
return (name == null) ? name : name.replace("$", "_");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.baeldung.junit.norunnablemethods;

public class NameUtilTestHelper {

public String formatName(String name) {
return (name == null) ? name : name.replace("$", "_");
}
}