Skip to content

Commit 071c67f

Browse files
Copilotjozkee
andcommitted
Remove duplicate obsolete constructor tests to avoid duplication
Co-authored-by: jozkee <[email protected]>
1 parent 51b812d commit 071c67f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/libraries/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateClient.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ public static void InvalidImpersonationLevel_Throws_ArgumentOutOfRangeException(
9999
[InlineData(PipeDirection.Out)]
100100
public static void NullHandle_Throws_ArgumentNullException(PipeDirection direction)
101101
{
102-
#pragma warning disable SYSLIB0063 // Testing the obsolete constructor
103-
AssertExtensions.Throws<ArgumentNullException>("safePipeHandle", () => new NamedPipeClientStream(direction, false, true, null));
104-
#pragma warning restore SYSLIB0063
105102
AssertExtensions.Throws<ArgumentNullException>("safePipeHandle", () => new NamedPipeClientStream(direction, false, null));
106103
}
107104

@@ -112,9 +109,6 @@ public static void NullHandle_Throws_ArgumentNullException(PipeDirection directi
112109
public static void InvalidHandle_Throws_ArgumentException(PipeDirection direction)
113110
{
114111
using SafePipeHandle pipeHandle = new SafePipeHandle(new IntPtr(-1), true);
115-
#pragma warning disable SYSLIB0063 // Testing the obsolete constructor
116-
AssertExtensions.Throws<ArgumentException>("safePipeHandle", () => new NamedPipeClientStream(direction, false, true, pipeHandle));
117-
#pragma warning restore SYSLIB0063
118112
AssertExtensions.Throws<ArgumentException>("safePipeHandle", () => new NamedPipeClientStream(direction, false, pipeHandle));
119113
}
120114

@@ -135,9 +129,6 @@ public static void BadHandleKind_Throws_IOException(PipeDirection direction)
135129
IntPtr handle = safeHandle.DangerousGetHandle();
136130

137131
SafePipeHandle fakePipeHandle = new SafePipeHandle(handle, ownsHandle: false);
138-
#pragma warning disable SYSLIB0063 // Testing the obsolete constructor
139-
Assert.Throws<IOException>(() => new NamedPipeClientStream(direction, false, true, fakePipeHandle));
140-
#pragma warning restore SYSLIB0063
141132
Assert.Throws<IOException>(() => new NamedPipeClientStream(direction, false, fakePipeHandle));
142133
}
143134
finally

0 commit comments

Comments
 (0)