From 7cec9c2c76cb10575c6ed1c32b0d2dafff284401 Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Thu, 19 Dec 2024 14:53:20 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E6=9B=B4=E6=94=B9=E8=BF=94=E5=9B=9E=E5=80=BC=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/dto/response/TestPlanCoverageDTO.java | 14 +++++++------- .../plan/controller/TestPlanControllerTests.java | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanCoverageDTO.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanCoverageDTO.java index e8ac358c7d..b833eb16df 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanCoverageDTO.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/response/TestPlanCoverageDTO.java @@ -19,9 +19,9 @@ public class TestPlanCoverageDTO { * 归档未通过 */ private int passed = 0; - private int passed_archived = 0; + private int passedArchived = 0; private int notPassed = 0; - private int notPassed_archived = 0; + private int notPassedArchived = 0; /** * 已完成 @@ -46,7 +46,7 @@ public class TestPlanCoverageDTO { if (isArchived) { this.archived++; - this.notPassed_archived++; + this.notPassedArchived++; } else { this.prepared++; this.notPassed++; @@ -58,7 +58,7 @@ public class TestPlanCoverageDTO { if (isArchived) { this.archived++; - this.passed_archived++; + this.passedArchived++; } else { this.finished++; this.passed++; @@ -70,7 +70,7 @@ public class TestPlanCoverageDTO { if (isArchived) { this.archived++; - this.notPassed_archived++; + this.notPassedArchived++; } else { this.finished++; this.notPassed++; @@ -82,7 +82,7 @@ public class TestPlanCoverageDTO { if (isArchived) { this.archived++; - this.passed_archived++; + this.passedArchived++; } else { this.running++; this.passed++; @@ -94,7 +94,7 @@ public class TestPlanCoverageDTO { if (isArchived) { this.archived++; - this.notPassed_archived++; + this.notPassedArchived++; } else { this.running++; this.notPassed++; diff --git a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java index 1cc594df30..82653f9b0e 100644 --- a/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java +++ b/backend/services/test-plan/src/test/java/io/metersphere/plan/controller/TestPlanControllerTests.java @@ -1882,8 +1882,8 @@ public class TestPlanControllerTests extends BaseTest { MvcResult mvcResult = this.requestPostWithOkAndReturn("/test-plan/rage", request); TestPlanCoverageDTO coverageDTO = this.getResultData(mvcResult, TestPlanCoverageDTO.class); - Assertions.assertEquals(coverageDTO.getUnExecute() + coverageDTO.getExecuted(), coverageDTO.getPassed() + coverageDTO.getNotPassed() + coverageDTO.getPassed_archived() + coverageDTO.getNotPassed_archived()); - Assertions.assertEquals(coverageDTO.getFinished() + coverageDTO.getRunning() + coverageDTO.getArchived() + coverageDTO.getPrepared(), coverageDTO.getPassed() + coverageDTO.getNotPassed() + coverageDTO.getPassed_archived() + coverageDTO.getNotPassed_archived()); + Assertions.assertEquals(coverageDTO.getUnExecute() + coverageDTO.getExecuted(), coverageDTO.getPassed() + coverageDTO.getNotPassed() + coverageDTO.getPassedArchived() + coverageDTO.getNotPassedArchived()); + Assertions.assertEquals(coverageDTO.getFinished() + coverageDTO.getRunning() + coverageDTO.getArchived() + coverageDTO.getPrepared(), coverageDTO.getPassed() + coverageDTO.getNotPassed() + coverageDTO.getPassedArchived() + coverageDTO.getNotPassedArchived()); }