Merge pull request '[fix]:[添加java测试代码]' (#19) from yinzy_dev into main
Reviewed-on: jk_yinzy/adsfasdfsadf#19 Reviewed-by: 君肯普通 <jk_yinzy@jk.com>
This commit is contained in:
commit
b463d6cd26
@ -4,7 +4,6 @@ name: multi-lang-ci
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
- push
|
|
||||||
- pull_request
|
- pull_request
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@ -11,4 +11,12 @@
|
|||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
<version>5.12.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
@ -4,5 +4,10 @@ public class App {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Hello, World!");
|
System.out.println("Hello, World!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String greet() {
|
||||||
|
return "Hello, World!";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
8
src/test/java/com/example/AppTest.java
Normal file
8
src/test/java/com/example/AppTest.java
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package com.example;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
public class AppTest {
|
||||||
|
@Test public void testGreet() { App app = new App(); assertEquals("Hello, World!", app.greet()); }
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user