From 852dc29a9c4332a09f5eca89c772a626f9078d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Tue, 3 May 2022 21:47:49 +0200 Subject: [PATCH] testfix --- src/main/java/neqsim/thermo/system/SystemThermo.java | 2 +- .../system/SystemThermoSetMolarCompositionTest.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index da2f1da52..75f6e5e61 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -5093,7 +5093,7 @@ public SystemProperties getProperties() { private void setMolarComposition(double[] molefractions, String type) { double totalFlow = getTotalNumberOfMoles(); if (totalFlow < 1e-100) { - String msg = "Total flow can not be 0 when setting molar composition"; + String msg = "must be larger than 0 (1e-100) when setting molar composition"; logger.error(msg); throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, "setMolarComposition", "totalFlow", msg)); diff --git a/src/test/java/neqsim/thermo/system/SystemThermoSetMolarCompositionTest.java b/src/test/java/neqsim/thermo/system/SystemThermoSetMolarCompositionTest.java index 76eec2fa4..3530ce5a2 100644 --- a/src/test/java/neqsim/thermo/system/SystemThermoSetMolarCompositionTest.java +++ b/src/test/java/neqsim/thermo/system/SystemThermoSetMolarCompositionTest.java @@ -57,7 +57,7 @@ void testNoFlow() { sys.setMolarComposition(new double[] { 1, 1.5, 1.75 }); }); Assertions.assertEquals( - "neqsim.util.exception.InvalidInputException: Total flow can not be 0 when setting molar composition", + "neqsim.util.exception.InvalidInputException: SystemSrkEos:setMolarComposition - Input totalFlow must be larger than 0 (1e-100) when setting molar composition", thrown.getMessage()); } @@ -69,8 +69,8 @@ void testNoFlowPlus() { sys.setMolarCompositionPlus(new double[] { 1, 1.5, 1.75 }); }); Assertions.assertEquals( - "neqsim.util.exception.InvalidInputException: Total flow can not be 0 when setting molar composition", - thrown.getMessage()); + "neqsim.util.exception.InvalidInputException: SystemSrkEos:setMolarComposition - Input totalFlow must be larger than 0 (1e-100) when setting molar composition", + thrown.getMessage()); } @Test @@ -81,7 +81,7 @@ void testNoFlowPlusFluid() { sys.setMolarCompositionOfPlusFluid(new double[] { 1, 1.5, 1.75 }); }); Assertions.assertEquals( - "neqsim.util.exception.InvalidInputException: Total flow can not be 0 when setting molar composition", - thrown.getMessage()); + "neqsim.util.exception.InvalidInputException: SystemSrkEos:setMolarComposition - Input totalFlow must be larger than 0 (1e-100) when setting molar composition", + thrown.getMessage()); } }