public void PublishWithRuntimeIdentifier_with_DefineConstants_Test(string rid, string driverFileName, ExecutableFile.Format executableFileFormat) { var exitCode = Shell.Run(WorkDir, "dotnet", "publish", "-r", rid, "-o", "out", "-p:DefineConstants=_PUBLISH_CHROMEDRIVER"); exitCode.Is(0); var driverFullPath = Path.Combine(WorkDir, "out", driverFileName); File.Exists(driverFullPath).IsTrue(); ExecutableFile.DetectFormat(driverFullPath).Is(executableFileFormat); }
public void PublishWithRuntimeIdentifier_with_MSBuildProp_Test(string rid, string driverFileName, ExecutableFile.Format executableFileFormat) { var exitCode = Shell.Run(WorkDir, "dotnet", "publish", "-r", rid, "-o", "out", "-p:PublishChromeDriver=true"); exitCode.Is(0); var driverFullPath = Path.Combine(WorkDir, "out", driverFileName); File.Exists(driverFullPath).IsTrue(); ExecutableFile.DetectFormat(driverFullPath).Is(executableFileFormat); }
public void BuildWithRuntimeIdentifier_Test(string rid, string driverFileName, ExecutableFile.Format executableFileFormat) { var exitCode = Shell.Run(WorkDir, "dotnet", "build", "-r", rid, "-o", "out"); exitCode.Is(0); var driverFullPath = Path.Combine(WorkDir, "out", driverFileName); File.Exists(driverFullPath).IsTrue(); ExecutableFile.DetectFormat(driverFullPath).Is(executableFileFormat); }
public void PublishWithRuntimeIdentifier_NoPublish_Test(string rid, string driverFileName, ExecutableFile.Format _) { var exitCode = Shell.Run(WorkDir, "dotnet", "publish", "-r", rid, "-o", "out"); exitCode.Is(0); var driverFullPath = Path.Combine(WorkDir, "out", driverFileName); File.Exists(driverFullPath).IsFalse(); }
public void PublishWithRuntimeIdentifier_NoPublish_Test(string rid, string driverFileName, ExecutableFile.Format _) { using var workSpace = new WorkSpace(copyFrom: "Project"); var exitCode = Shell.Run(workSpace, "dotnet", "publish", "-r", rid, "-o", "out"); exitCode.Is(0); var driverFullPath = Path.Combine(workSpace, "out", driverFileName); File.Exists(driverFullPath).IsFalse(); }