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:
君肯普通 2025-12-05 18:11:28 +08:00
commit b463d6cd26
4 changed files with 21 additions and 1 deletions

View File

@ -4,7 +4,6 @@ name: multi-lang-ci
trigger: trigger:
event: event:
- push
- pull_request - pull_request
branch: branch:
- main - main

View File

@ -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>

View File

@ -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!";
}
} }

View 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()); }
}