From df40b612353ddd37a7f21c3e30605a88ccb1b554 Mon Sep 17 00:00:00 2001 From: Hugo Marcellin Date: Mon, 18 Sep 2023 12:03:59 +0200 Subject: [PATCH] Revert --- .../server/service/SupervisionService.java | 10 +++++----- .../server/SupervisionControllerTest.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gridsuite/sensitivityanalysis/server/service/SupervisionService.java b/src/main/java/org/gridsuite/sensitivityanalysis/server/service/SupervisionService.java index b7884783..2c399239 100644 --- a/src/main/java/org/gridsuite/sensitivityanalysis/server/service/SupervisionService.java +++ b/src/main/java/org/gridsuite/sensitivityanalysis/server/service/SupervisionService.java @@ -6,7 +6,7 @@ */ package org.gridsuite.sensitivityanalysis.server.service; -import org.gridsuite.sensitivityanalysis.server.repositories.GlobalStatusRepository; +import org.gridsuite.sensitivityanalysis.server.repositories.AnalysisResultRepository; import org.springframework.stereotype.Service; /** @@ -14,13 +14,13 @@ */ @Service public class SupervisionService { - private final GlobalStatusRepository globalStatusRepository; + private final AnalysisResultRepository analysisResultRepository; - public SupervisionService(GlobalStatusRepository globalStatusRepository) { - this.globalStatusRepository = globalStatusRepository; + public SupervisionService(AnalysisResultRepository analysisResultRepository) { + this.analysisResultRepository = analysisResultRepository; } public Integer getResultsCount() { - return (int) globalStatusRepository.count(); + return (int) analysisResultRepository.count(); } } diff --git a/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java b/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java index f928dffd..cea88cf4 100644 --- a/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java +++ b/src/test/java/org/gridsuite/sensitivityanalysis/server/SupervisionControllerTest.java @@ -42,7 +42,7 @@ public void testResultCount() throws Exception { .andReturn(); String resultCount = mvcResult.getResponse().getContentAsString(); - assertEquals(resultCount, "0"); + assertEquals("0", resultCount); } }