From c900cb8dd887e06b53019817dfcab3e6c86e79e2 Mon Sep 17 00:00:00 2001 From: jarchambault Date: Fri, 13 Dec 2024 18:04:46 +0100 Subject: [PATCH] Modify gradient user routine test Signed-off-by: jarchambault --- .../openloadflow/knitro/solver/AcLoadFlowWithCachingTest.java | 3 --- .../knitro/solver/utils/KnitroSolverParametersTest.java | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/test/java/com/powsybl/openloadflow/knitro/solver/AcLoadFlowWithCachingTest.java b/src/test/java/com/powsybl/openloadflow/knitro/solver/AcLoadFlowWithCachingTest.java index de27ca5..1afce29 100644 --- a/src/test/java/com/powsybl/openloadflow/knitro/solver/AcLoadFlowWithCachingTest.java +++ b/src/test/java/com/powsybl/openloadflow/knitro/solver/AcLoadFlowWithCachingTest.java @@ -7,11 +7,9 @@ */ package com.powsybl.openloadflow.knitro.solver; -//import com.powsybl.ieeecdf.converter.IeeeCdfNetworkFactory; import com.powsybl.iidm.network.Bus; import com.powsybl.iidm.network.Network; import com.powsybl.iidm.network.VariantManagerConstants; -//import com.powsybl.iidm.network.extensions.*; import com.powsybl.iidm.network.test.EurostagTutorialExample1Factory; import com.powsybl.iidm.network.test.FourSubstationsNodeBreakerFactory; import com.powsybl.loadflow.LoadFlow; @@ -26,7 +24,6 @@ import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -//import java.util.List; import java.util.Set; import static com.powsybl.openloadflow.util.LoadFlowAssert.*; diff --git a/src/test/java/com/powsybl/openloadflow/knitro/solver/utils/KnitroSolverParametersTest.java b/src/test/java/com/powsybl/openloadflow/knitro/solver/utils/KnitroSolverParametersTest.java index fc2348b..d31aa25 100644 --- a/src/test/java/com/powsybl/openloadflow/knitro/solver/utils/KnitroSolverParametersTest.java +++ b/src/test/java/com/powsybl/openloadflow/knitro/solver/utils/KnitroSolverParametersTest.java @@ -48,9 +48,9 @@ void testGradientUserRoutine() { assertEquals(1, parametersKnitro.getGradientUserRoutine()); // wrong values - IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> parametersKnitro.setGradientComputationMode(0)); + IllegalArgumentException e = assertThrows(IllegalArgumentException.class, () -> parametersKnitro.setGradientUserRoutine(0)); assertEquals("User routine must be between 1 and 2", e.getMessage()); - IllegalArgumentException e2 = assertThrows(IllegalArgumentException.class, () -> parametersKnitro.setGradientComputationMode(3)); + IllegalArgumentException e2 = assertThrows(IllegalArgumentException.class, () -> parametersKnitro.setGradientUserRoutine(3)); assertEquals("User routine must be between 1 and 2", e2.getMessage()); }