From 7f7301285b99b9cd95e1e1a84794f0325776d1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E9=A3=9E?= <1599532416@qq.com> Date: Tue, 16 Apr 2024 08:30:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Maven=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- untitled/src/main/java/HelloWorld.java | 8 ++++++++ untitled/src/test/java/HelloWorldTest.java | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 untitled/src/main/java/HelloWorld.java create mode 100644 untitled/src/test/java/HelloWorldTest.java diff --git a/untitled/src/main/java/HelloWorld.java b/untitled/src/main/java/HelloWorld.java new file mode 100644 index 0000000..ade3295 --- /dev/null +++ b/untitled/src/main/java/HelloWorld.java @@ -0,0 +1,8 @@ +public class HelloWorld { + public static void main(String[] args) { +// System.out.println("hello world"); + } + public static int sum(int m,int n){ + return m+n; + } +} diff --git a/untitled/src/test/java/HelloWorldTest.java b/untitled/src/test/java/HelloWorldTest.java new file mode 100644 index 0000000..d8ae4a5 --- /dev/null +++ b/untitled/src/test/java/HelloWorldTest.java @@ -0,0 +1,12 @@ +import org.junit.jupiter.api.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.*; + +class HelloWorldTest { + + @Test + void sum() { + assertEquals(2,HelloWorld.sum(1,1)); + } +} \ No newline at end of file -- Gitee From e24e2ec60b3945fcefa9f388b8ca9699f5d8211a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E9=B9=8F=E9=A3=9E?= <1599532416@qq.com> Date: Tue, 16 Apr 2024 10:01:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- untitled/pom.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 untitled/pom.xml diff --git a/untitled/pom.xml b/untitled/pom.xml new file mode 100644 index 0000000..fee12c0 --- /dev/null +++ b/untitled/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + org.example + untitled + 1.0-SNAPSHOT + + + 21 + 21 + UTF-8 + + + + + junit + junit + 4.13.2 + test + + + org.junit.jupiter + junit-jupiter + RELEASE + test + + + org.junit.jupiter + junit-jupiter + RELEASE + test + + + \ No newline at end of file -- Gitee