Skip to content

Commit

Permalink
Update TemporaryFileTest
Browse files Browse the repository at this point in the history
  • Loading branch information
FreePhoenix888 committed Feb 17, 2022
1 parent 2f7a0a7 commit 2b7a56d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions csharp/Platform.IO.Tests/TemporaryFileTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ public class TemporaryFileTests
[Fact]
public void TemporaryFileTest()
{
using Process process = new();
process.StartInfo.FileName = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "Platform.IO.Tests.TemporaryFileTest", "bin", "Debug", "net5", "Platform.IO.Tests.TemporaryFileTest"));
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
var startInfo = new ProcessStartInfo();
startInfo.WorkingDirectory = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "Platform.IO.Tests.TemporaryFileTest"));
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.FileName = "dotnet";
startInfo.Arguments = "run --project Platform.IO.Tests.TemporaryFileTest.csproj";
using Process process = new(){StartInfo = startInfo};
process.Start();
var path = process.StandardOutput.ReadLine();
Assert.True(File.Exists(path));
Expand Down

0 comments on commit 2b7a56d

Please sign in to comment.