Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <[email protected]>
  • Loading branch information
flo-dup committed Nov 6, 2023
1 parent 7575910 commit a6ee91d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static Command getCommand(DynaWaltzConfig dynaWaltzConfig) {
return new GroupCommandBuilder()
.id("dyn_fs")
.subCommand()
.program(getProgram(dynaWaltzConfig))
.program(dynaWaltzConfig.getProgram())
.args("jobs", JOBS_FILENAME)
.add()
.build();
Expand All @@ -87,15 +87,11 @@ public static Command getVersionCommand(DynaWaltzConfig dynaWaltzConfig) {
List<String> args = Collections.singletonList("version");
return new SimpleCommandBuilder()
.id("dynawo_version")
.program(getProgram(dynaWaltzConfig))
.program(dynaWaltzConfig.getProgram())
.args(args)
.build();
}

private static String getProgram(DynaWaltzConfig dynaWaltzConfig) {
return dynaWaltzConfig.getProgram();
}

@Override
public CompletableFuture<DynamicSimulationResult> run(Network network, DynamicModelsSupplier dynamicModelsSupplier, EventModelsSupplier eventModelsSupplier, CurvesSupplier curvesSupplier, String workingVariantId,
ComputationManager computationManager, DynamicSimulationParameters parameters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void testWithoutCurves() throws Exception {
void checkVersionCommand() {
String versionCommand = DynaWaltzProvider.getVersionCommand(config).toString(0);
if (SystemUtils.IS_OS_WINDOWS) {
assertEquals("[\\home\\dynawaltz\\dynawo.cmd, version]", versionCommand);
assertEquals("[/home/dynawaltz/dynawo.cmd, version]", versionCommand);
} else {
assertEquals("[/home/dynawaltz/dynawo.sh, version]", versionCommand);
}
Expand Down

0 comments on commit a6ee91d

Please sign in to comment.