Skip to content

Commit

Permalink
devonfw#608: fixed test
Browse files Browse the repository at this point in the history
made sure that context runs on windows to detect dotnet.cmd properly
  • Loading branch information
jan-vcapgemini committed Oct 4, 2024
1 parent 8aa538a commit 7e89d36
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import com.devonfw.tools.ide.context.AbstractIdeContextTest;
import com.devonfw.tools.ide.context.IdeTestContext;
import com.devonfw.tools.ide.log.IdeLogLevel;
import com.devonfw.tools.ide.os.SystemInfo;
import com.devonfw.tools.ide.os.SystemInfoMock;
import com.devonfw.tools.ide.tool.dotnet.DotNet;

/**
Expand Down Expand Up @@ -210,6 +212,8 @@ public void processWarningAndErrorShouldBeLogged(ProcessErrorHandling processErr
public void enablingCaptureShouldRedirectAndCaptureStreamsWithErrorsCorrectly() throws Exception {
// arrange
IdeTestContext context = newContext("processcontext");
SystemInfo systemInfo = SystemInfoMock.of("windows");
context.setSystemInfo(systemInfo);

// act
CliProcessException thrown = assertThrows(CliProcessException.class, () -> context.getCommandletManager().getCommandlet(DotNet.class).run());
Expand Down

0 comments on commit 7e89d36

Please sign in to comment.