Skip to content

Commit

Permalink
#1487: Add functional test to ensure Sarif.Multitool.exe can be launc…
Browse files Browse the repository at this point in the history
…hed. (#1489)
  • Loading branch information
Larry Golding committed May 9, 2019
1 parent 1ab0ab4 commit e4c0bcc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/Test.FunctionalTests.Sarif/MultitoolCommandLineTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Diagnostics;
using System.IO;
using FluentAssertions;
using Microsoft.CodeAnalysis.Sarif;
using Xunit;

namespace Microsoft.CodeAnalysis.Test.FunctionalTests.Sarif
{
public class MultitoolCommandLineTests
{
[Fact]
[Trait(TestTraits.Bug, "1487")]
public void Multitool_LaunchesAndRunsSuccessfully()
{
string multitoolPath = Path.GetFullPath(
Path.Combine(
Directory.GetCurrentDirectory(),
@"..\..\Sarif.Multitool\net461\Sarif.Multitool.exe"));

ProcessStartInfo startInfo = new ProcessStartInfo(multitoolPath, @"validate v2\ConverterTestData\ContrastSecurity\WebGoat.xml.sarif")
{
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true
};

using (Process process = Process.Start(startInfo))
{
process.WaitForExit();

process.ExitCode.Should().Be(0);
}
}
}
}

0 comments on commit e4c0bcc

Please sign in to comment.