Skip to content

Commit

Permalink
testfix
Browse files Browse the repository at this point in the history
  • Loading branch information
asmfstatoil committed May 3, 2022
1 parent 6953e97 commit 852dc29
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/neqsim/thermo/system/SystemThermo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand All @@ -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
Expand All @@ -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());
}
}

0 comments on commit 852dc29

Please sign in to comment.