Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 44a3ded

Browse filesBrowse files
author
Nilanchal Panigrahy
committed
Junit5 examples
0 parents  commit 44a3ded
Copy full SHA for 44a3ded

File tree

Expand file treeCollapse file tree

92 files changed

+906
-0
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

92 files changed

+906
-0
lines changed

‎ordering-tests/.gitignore

Copy file name to clipboard
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
!**/src/main/**/target/
4+
!**/src/test/**/target/
5+
6+
### IntelliJ IDEA ###
7+
.idea/modules.xml
8+
.idea/jarRepositories.xml
9+
.idea/compiler.xml
10+
.idea/libraries/
11+
*.iws
12+
*.iml
13+
*.ipr
14+
15+
### Eclipse ###
16+
.apt_generated
17+
.classpath
18+
.factorypath
19+
.project
20+
.settings
21+
.springBeans
22+
.sts4-cache
23+
24+
### NetBeans ###
25+
/nbproject/private/
26+
/nbbuild/
27+
/dist/
28+
/nbdist/
29+
/.nb-gradle/
30+
build/
31+
!**/src/main/**/build/
32+
!**/src/test/**/build/
33+
34+
### VS Code ###
35+
.vscode/
36+
37+
### Mac OS ###
38+
.DS_Store

‎ordering-tests/.idea/.gitignore

Copy file name to clipboardExpand all lines: ordering-tests/.idea/.gitignore
+8Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/codeStyles/Project.xml

Copy file name to clipboardExpand all lines: ordering-tests/.idea/codeStyles/Project.xml
+7Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/codeStyles/codeStyleConfig.xml

Copy file name to clipboardExpand all lines: ordering-tests/.idea/codeStyles/codeStyleConfig.xml
+5Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/encodings.xml

Copy file name to clipboardExpand all lines: ordering-tests/.idea/encodings.xml
+8Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/misc.xml

Copy file name to clipboardExpand all lines: ordering-tests/.idea/misc.xml
+13Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/sonarlint/issuestore/0/7/0755c3d32f279d686d395293a2095f79c309d179

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/0/7/0755c3d32f279d686d395293a2095f79c309d179
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/1/b/1baa1e847ff93697f1966c13a322faa0a92cd89b

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/1/b/1baa1e847ff93697f1966c13a322faa0a92cd89b
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/3/f/3f6e673cc04c79443bb104a11434b9c1f3c048da

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/3/f/3f6e673cc04c79443bb104a11434b9c1f3c048da
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/5/2/520c37e0677a39b7b55e81137bfca60224b8a8f8

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/5/2/520c37e0677a39b7b55e81137bfca60224b8a8f8
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/5/b/5beb7d00c030c423b7c0e1827675137146497bd9

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/5/b/5beb7d00c030c423b7c0e1827675137146497bd9
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/7/3/73940975ba846cd8eeec29b160f37bc6c26185a7

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/7/3/73940975ba846cd8eeec29b160f37bc6c26185a7
+2Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/sonarlint/issuestore/8/1/81426308626c0dbc1037b3bcd7dfda8e49be331b

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/8/1/81426308626c0dbc1037b3bcd7dfda8e49be331b
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/8/2/826bca0c18faba28a3f6da978370fc488ecb5ad6

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/8/2/826bca0c18faba28a3f6da978370fc488ecb5ad6
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/a/2/a2420cad342f010b80b3a8b6ce6b03905d280146

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/a/2/a2420cad342f010b80b3a8b6ce6b03905d280146
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/a/c/ace819e7f5427542c56c1f7e1f5fe7ad69453cd4

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/a/c/ace819e7f5427542c56c1f7e1f5fe7ad69453cd4
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/b/0/b0cbccf4422d1c9b0c237a47c85b7f3074b7f424

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/b/0/b0cbccf4422d1c9b0c237a47c85b7f3074b7f424
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/b/2/b2454f37e2f82f115e12a02562bbc98859014781

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/b/2/b2454f37e2f82f115e12a02562bbc98859014781
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/c/e/ce5a86d7d5dca55c8d9b2dc846db12aaad1e5204

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/c/e/ce5a86d7d5dca55c8d9b2dc846db12aaad1e5204
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/e/4/e49f932600937236f9dbe62b10dbb964d54d5cd5

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/e/4/e49f932600937236f9dbe62b10dbb964d54d5cd5
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/e/5/e53970a2ff553759c6b26dbfd17d0d6348781f52

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/e/5/e53970a2ff553759c6b26dbfd17d0d6348781f52
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/issuestore/index.pb

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/issuestore/index.pb
+33Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/0/7/0755c3d32f279d686d395293a2095f79c309d179

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/0/7/0755c3d32f279d686d395293a2095f79c309d179
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/1/b/1baa1e847ff93697f1966c13a322faa0a92cd89b

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/1/b/1baa1e847ff93697f1966c13a322faa0a92cd89b
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/3/f/3f6e673cc04c79443bb104a11434b9c1f3c048da

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/3/f/3f6e673cc04c79443bb104a11434b9c1f3c048da
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/4/4/442292b8a7efeabbe4cc176709b833b1792140ec
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/5/2/520c37e0677a39b7b55e81137bfca60224b8a8f8

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/5/2/520c37e0677a39b7b55e81137bfca60224b8a8f8
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/5/b/5beb7d00c030c423b7c0e1827675137146497bd9

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/5/b/5beb7d00c030c423b7c0e1827675137146497bd9
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/7/3/73940975ba846cd8eeec29b160f37bc6c26185a7

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/7/3/73940975ba846cd8eeec29b160f37bc6c26185a7
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/8/1/81426308626c0dbc1037b3bcd7dfda8e49be331b

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/8/1/81426308626c0dbc1037b3bcd7dfda8e49be331b
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/8/2/826bca0c18faba28a3f6da978370fc488ecb5ad6

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/8/2/826bca0c18faba28a3f6da978370fc488ecb5ad6
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/a/2/a2420cad342f010b80b3a8b6ce6b03905d280146

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/a/2/a2420cad342f010b80b3a8b6ce6b03905d280146
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/a/c/ace819e7f5427542c56c1f7e1f5fe7ad69453cd4

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/a/c/ace819e7f5427542c56c1f7e1f5fe7ad69453cd4
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/b/0/b0cbccf4422d1c9b0c237a47c85b7f3074b7f424

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/b/0/b0cbccf4422d1c9b0c237a47c85b7f3074b7f424
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/b/2/b2454f37e2f82f115e12a02562bbc98859014781

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/b/2/b2454f37e2f82f115e12a02562bbc98859014781
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/c/e/ce5a86d7d5dca55c8d9b2dc846db12aaad1e5204

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/c/e/ce5a86d7d5dca55c8d9b2dc846db12aaad1e5204
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/e/4/e49f932600937236f9dbe62b10dbb964d54d5cd5

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/e/4/e49f932600937236f9dbe62b10dbb964d54d5cd5
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/e/5/e53970a2ff553759c6b26dbfd17d0d6348781f52

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/e/5/e53970a2ff553759c6b26dbfd17d0d6348781f52
Whitespace-only changes.

‎ordering-tests/.idea/sonarlint/securityhotspotstore/index.pb

Copy file name to clipboardExpand all lines: ordering-tests/.idea/sonarlint/securityhotspotstore/index.pb
+33Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/.idea/uiDesigner.xml

Copy file name to clipboardExpand all lines: ordering-tests/.idea/uiDesigner.xml
+124Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ordering-tests/pom.xml

Copy file name to clipboard
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.stacktips</groupId>
8+
<artifactId>ordering-tests</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>17</maven.compiler.source>
13+
<maven.compiler.target>17</maven.compiler.target>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.junit.jupiter</groupId>
20+
<artifactId>junit-jupiter-params</artifactId>
21+
<version>5.9.3</version>
22+
<scope>test</scope>
23+
</dependency>
24+
</dependencies>
25+
26+
</project>
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.stacktips;
2+
3+
public class Main {
4+
5+
public static void main(String[] args) {
6+
System.out.println("Hello world!");
7+
}
8+
}
+40Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.stacktips;
2+
3+
import org.junit.jupiter.api.DisplayName;
4+
import org.junit.jupiter.api.Test;
5+
import org.junit.jupiter.api.TestMethodOrder;
6+
import org.junit.jupiter.params.ParameterizedTest;
7+
import org.junit.jupiter.params.provider.CsvSource;
8+
9+
import static org.junit.jupiter.api.Assertions.assertTrue;
10+
11+
@TestMethodOrder(ParameterCountOrder.class)
12+
class CustomOrdererTests {
13+
14+
@Test
15+
@DisplayName("testMethod1")
16+
void test1() {
17+
assertTrue(true);
18+
}
19+
20+
@ParameterizedTest(name = "{index} ==> product={0}")
21+
@CsvSource({
22+
"iPhone 15",
23+
"Mx Master 3S"
24+
})
25+
@DisplayName("testMethod2")
26+
void test2(String product) {
27+
assertTrue(true);
28+
}
29+
30+
@DisplayName("testMethod3")
31+
@ParameterizedTest(name = "{index} ==> product={0}, price={1}")
32+
@CsvSource({
33+
"iPhone 15, 999",
34+
"Mx Master 3S, 89"
35+
})
36+
void test3(String product, double price) {
37+
assertTrue(true);
38+
}
39+
40+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.