From dd75aec528cac8bcd4fc33a374e8efd200d24e8b Mon Sep 17 00:00:00 2001
From: hzh <819114173@qq.com>
Date: Mon, 15 Apr 2024 11:06:58 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86maven=E9=A1=B9?=
=?UTF-8?q?=E7=9B=AE1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
work2_git/pom.xml | 17 +++++++++++++++++
work2_git/src/main/java/org/example/Main.java | 7 +++++++
2 files changed, 24 insertions(+)
create mode 100644 work2_git/pom.xml
create mode 100644 work2_git/src/main/java/org/example/Main.java
diff --git a/work2_git/pom.xml b/work2_git/pom.xml
new file mode 100644
index 0000000..e05ae62
--- /dev/null
+++ b/work2_git/pom.xml
@@ -0,0 +1,17 @@
+
+
+ 4.0.0
+
+ org.example
+ work2_git
+ 1.0-SNAPSHOT
+
+
+ 8
+ 8
+ UTF-8
+
+
+
\ No newline at end of file
diff --git a/work2_git/src/main/java/org/example/Main.java b/work2_git/src/main/java/org/example/Main.java
new file mode 100644
index 0000000..407f157
--- /dev/null
+++ b/work2_git/src/main/java/org/example/Main.java
@@ -0,0 +1,7 @@
+package org.example;
+
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
--
Gitee
From 0101df2968f4e87ee0cc733bff0aa144eeb493cb Mon Sep 17 00:00:00 2001
From: hzh <819114173@qq.com>
Date: Mon, 15 Apr 2024 11:19:55 +0800
Subject: [PATCH 2/4] =?UTF-8?q?Junit=20=E5=8D=95=E5=85=83=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=E4=BE=9D=E8=B5=96@Test=E6=B3=A8=E8=A7=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
work2_git/pom.xml | 17 ++++++++++
work2_git/src/main/java/org/example/Main.java | 31 +++++++++++++++++--
2 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/work2_git/pom.xml b/work2_git/pom.xml
index e05ae62..efc6304 100644
--- a/work2_git/pom.xml
+++ b/work2_git/pom.xml
@@ -14,4 +14,21 @@
UTF-8
+
+
+
+ junit
+ junit
+ 4.12
+
+
+ org.testng
+ testng
+ RELEASE
+ compile
+
+
+
+
+
\ No newline at end of file
diff --git a/work2_git/src/main/java/org/example/Main.java b/work2_git/src/main/java/org/example/Main.java
index 407f157..57c5e04 100644
--- a/work2_git/src/main/java/org/example/Main.java
+++ b/work2_git/src/main/java/org/example/Main.java
@@ -1,7 +1,34 @@
package org.example;
+import org.junit.Test;
+import static org.junit.Assert.*;
public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
+
+ @Test
+ public void testAddition() {
+ // Arrange
+ int a = 5;
+ int b = 10;
+
+ // Act
+ int result = a + b;
+
+ // Assert
+ assertEquals(15, result);
+ }
+
+ @Test
+ public void testSubtraction() {
+ // Arrange
+ int a = 10;
+ int b = 5;
+
+ // Act
+ int result = a - b;
+
+ // Assert
+ assertEquals(5, result);
}
+
+ // Add more test methods as needed
}
\ No newline at end of file
--
Gitee
From 5c5ade68d958baa44d145958b0f8fea1ef8d5a6f Mon Sep 17 00:00:00 2001
From: hzh <819114173@qq.com>
Date: Mon, 15 Apr 2024 11:32:45 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E5=88=86=E6=94=AF1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
work2_git/src/main/java/org/example/Main.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/work2_git/src/main/java/org/example/Main.java b/work2_git/src/main/java/org/example/Main.java
index 57c5e04..c87d7cc 100644
--- a/work2_git/src/main/java/org/example/Main.java
+++ b/work2_git/src/main/java/org/example/Main.java
@@ -3,7 +3,7 @@ import org.junit.Test;
import static org.junit.Assert.*;
public class Main {
-
+//新建分支2
@Test
public void testAddition() {
// Arrange
--
Gitee
From 26e1ff10628bb9b0ebc5ec016552941dc36e72d5 Mon Sep 17 00:00:00 2001
From: hzh <819114173@qq.com>
Date: Mon, 15 Apr 2024 11:42:14 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=8C=E6=88=90-?=
=?UTF-8?q?=E8=83=A1=E5=AD=90=E6=81=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
work2_git/src/main/java/org/example/Main.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/work2_git/src/main/java/org/example/Main.java b/work2_git/src/main/java/org/example/Main.java
index c87d7cc..3cb4b3e 100644
--- a/work2_git/src/main/java/org/example/Main.java
+++ b/work2_git/src/main/java/org/example/Main.java
@@ -3,7 +3,7 @@ import org.junit.Test;
import static org.junit.Assert.*;
public class Main {
-//新建分支2
+//
@Test
public void testAddition() {
// Arrange
--
Gitee