diff options
author | sepidehMS <sekho@microsoft.com> | 2017-02-07 00:28:24 +0300 |
---|---|---|
committer | sepidehMS <sekho@microsoft.com> | 2017-02-08 02:46:26 +0300 |
commit | 493cb79ff4976479be5cc7c6f1fe2d5d9b710425 (patch) | |
tree | ca95a1b72112f67cf8784c3f2bfa4eb5eeec630c /src/System.Diagnostics.Process | |
parent | ec6a6de7d69a3000866e177a5bcb7354ea96d05e (diff) |
Add comments to PlatformSpecific tests
Diffstat (limited to 'src/System.Diagnostics.Process')
5 files changed, 28 insertions, 28 deletions
diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs index 7ba123d542..dacc97a9ca 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs @@ -247,7 +247,7 @@ namespace System.Diagnostics.Tests Assert.False(psi.UseShellExecute, "UseShellExecute=true is not supported on onecore."); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // UseShellExecute currently not supported on Windows [Fact] public void TestUseShellExecuteProperty_SetAndGet_Unix() { @@ -261,7 +261,7 @@ namespace System.Diagnostics.Tests Assert.False(psi.UseShellExecute); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // UseShellExecute currently not supported on Windows [Theory] [InlineData(0)] [InlineData(1)] @@ -315,7 +315,7 @@ namespace System.Diagnostics.Tests } - [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] + [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] // APIs throw PNSE on Unix public void TestUserCredentialsPropertiesOnUnix() { Assert.Throws<PlatformNotSupportedException>(() => _process.StartInfo.Domain); @@ -348,7 +348,7 @@ namespace System.Diagnostics.Tests } [ActiveIssue(12696)] - [Fact, PlatformSpecific(TestPlatforms.Windows), OuterLoop] // Requires admin privileges + [Fact, PlatformSpecific(TestPlatforms.Windows), OuterLoop] // Uses P/Invokes, Requires admin privileges public void TestUserCredentialsPropertiesOnWindows() { string username = "test", password = "PassWord123!!"; diff --git a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs index cc26795971..e0334dbc13 100644 --- a/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs +++ b/src/System.Diagnostics.Process/tests/ProcessStartInfoTests.netstandard.cs @@ -71,7 +71,7 @@ namespace System.Diagnostics.Tests Assert.False(psi.Environment.Contains(new KeyValuePair<string,string>("NewKey3", "NewValue3"))); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Test case is specific to Windows [Fact] public void TestVerbsProperty() { @@ -88,7 +88,7 @@ namespace System.Diagnostics.Tests Assert.DoesNotContain("closed", psi.Verbs, StringComparer.OrdinalIgnoreCase); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Test case is specific to Unix [Fact] public void TestEnvironmentVariablesPropertyUnix(){ ProcessStartInfo psi = new ProcessStartInfo(); diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.cs b/src/System.Diagnostics.Process/tests/ProcessTests.cs index f7d3832251..2887049aef 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.cs @@ -55,7 +55,7 @@ namespace System.Diagnostics.Tests } [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsNanoServer))] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Expected behavior varies on Windows and Unix public void TestBasePriorityOnWindows() { ProcessPriorityClass originalPriority = _process.PriorityClass; @@ -80,7 +80,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior varies on Windows and Unix [OuterLoop] [Trait(XunitConstants.Category, XunitConstants.RequiresElevation)] public void TestBasePriorityOnUnix() @@ -149,7 +149,7 @@ namespace System.Diagnostics.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Tests UseShellExecute with ProcessStartInfo [Fact] public void TestUseShellExecute_Unix_Succeeds() { @@ -453,7 +453,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Expected behavior varies on Windows and Unix [OuterLoop] [Trait(XunitConstants.Category, XunitConstants.RequiresElevation)] public void TestPriorityClassUnix() @@ -473,7 +473,7 @@ namespace System.Diagnostics.Tests } } - [Fact, PlatformSpecific(TestPlatforms.Windows)] + [Fact, PlatformSpecific(TestPlatforms.Windows)] // Expected behavior varies on Windows and Unix public void TestPriorityClassWindows() { ProcessPriorityClass priorityClass = _process.PriorityClass; @@ -548,7 +548,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get process Id public void TestRootGetProcessById() { Process p = Process.GetProcessById(1); @@ -611,7 +611,7 @@ namespace System.Diagnostics.Tests return true; } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Behavior differs on Windows and Unix [ConditionalTheory(nameof(ProcessPeformanceCounterEnabled))] [MemberData(nameof(GetTestProcess))] public void TestProcessOnRemoteMachineWindows(Process currentProcess, Process remoteProcess) @@ -624,7 +624,7 @@ namespace System.Diagnostics.Tests Assert.Throws<NotSupportedException>(() => remoteProcess.MainModule); } - [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] + [Fact, PlatformSpecific(TestPlatforms.AnyUnix)] // Behavior differs on Windows and Unix public void TestProcessOnRemoteMachineUnix() { Process currentProcess = Process.GetCurrentProcess(); @@ -739,7 +739,7 @@ namespace System.Diagnostics.Tests Assert.NotEqual(0, e.NativeErrorCode); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Needs permissions on Unix // NativeErrorCode not 193 on Windows Nano for ERROR_BAD_EXE_FORMAT, issue #10290 [ConditionalFact(nameof(PlatformDetection) + "." + nameof(PlatformDetection.IsNotWindowsNanoServer))] public void TestStartOnWindowsWithBadFileFormat() @@ -751,7 +751,7 @@ namespace System.Diagnostics.Tests Assert.NotEqual(0, e.NativeErrorCode); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get permissions [Fact] public void TestStartOnUnixWithBadPermissions() { @@ -763,7 +763,7 @@ namespace System.Diagnostics.Tests Assert.NotEqual(0, e.NativeErrorCode); } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get permissions [Fact] public void TestStartOnUnixWithBadFormat() { diff --git a/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs b/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs index a0e8735adf..3fb4e9b9fd 100644 --- a/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs +++ b/src/System.Diagnostics.Process/tests/ProcessTests.netstandard.cs @@ -13,7 +13,7 @@ namespace System.Diagnostics.Tests public partial class ProcessTests : ProcessTestBase { [Fact] - [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX public void TestHandleCount() { using (Process p = Process.GetCurrentProcess()) @@ -23,7 +23,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // Expected process HandleCounts differs on OSX public void TestHandleCount_OSX() { using (Process p = Process.GetCurrentProcess()) @@ -33,7 +33,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Linux | TestPlatforms.Windows)] // Expected process HandleCounts differs on OSX public void HandleCountChanges() { RemoteInvoke(() => @@ -56,7 +56,7 @@ namespace System.Diagnostics.Tests }).Dispose(); } - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Uses P/Invokes to get the process Id [Fact] public void TestRespondingWindows() { @@ -66,7 +66,7 @@ namespace System.Diagnostics.Tests } } - [PlatformSpecific(TestPlatforms.AnyUnix)] + [PlatformSpecific(TestPlatforms.AnyUnix)] // Uses P/Invokes to get the process Id [Fact] private void TestWindowApisUnix() { @@ -162,7 +162,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartInvalidNamesTest() { Assert.Throws<InvalidOperationException>(() => Process.Start(null, "userName", new SecureString(), "thisDomain")); @@ -171,7 +171,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartWithInvalidUserNamePassword() { SecureString password = AsSecureString("Value"); @@ -180,7 +180,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartTest() { string currentProcessName = GetCurrentProcessName(); @@ -199,7 +199,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartWithArgumentsTest() { string currentProcessName = GetCurrentProcessName(); @@ -220,7 +220,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.Windows)] + [PlatformSpecific(TestPlatforms.Windows)] // Starting process with authentication not supported on Unix public void Process_StartWithDuplicatePassword() { ProcessStartInfo psi = new ProcessStartInfo(); diff --git a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs index d45bf936e6..45f6215a28 100644 --- a/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs +++ b/src/System.Diagnostics.Process/tests/ProcessThreadTests.cs @@ -62,7 +62,7 @@ namespace System.Diagnostics.Tests } [Fact] - [PlatformSpecific(TestPlatforms.OSX)] + [PlatformSpecific(TestPlatforms.OSX)] // OSX throws PNSE from StartTime public void TestStartTimeProperty_OSX() { using (Process p = Process.GetCurrentProcess()) |