Nishit/BAEL-4340 executing junit via command line (#11096)

* executing junit via command line

* incorporating review comments

* incorporating review comments
This commit is contained in:
nishitgoyal17 2021-08-24 05:54:13 +05:30 committed by GitHub
parent 70283b1191
commit 22e6245c81
3 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,27 @@
package com.baeldung.commandline;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class FirstUnitTest {
@Test
void whenThis_thenThat() {
assertTrue(true);
}
@Test
void whenSomething_thenSomething() {
assertTrue(true);
}
@Test
void whenSomethingElse_thenSomethingElse() {
assertTrue(true);
}
}

View File

@ -0,0 +1,19 @@
package com.baeldung.commandline;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
class SecondUnitTest {
@Test
void whenSomething_thenSomething() {
assertTrue(true);
}
@Test
void whenSomethingElse_thenSomethingElse() {
assertTrue(true);
}
}

View File

@ -38,6 +38,14 @@
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-console-standalone -->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-console-standalone</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>