-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make BasicHttpSecurity default constructor public in the contract.
* Already public in the implementation. * If BasicHttpSecurityMode is set to Message or TransportWithMessageCredential throw PNSE. * Fixes #2365
- Loading branch information
1 parent
4df27d4
commit 4037cc5
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/System.ServiceModel.Http/tests/ServiceModel/BasicHttpSecurityTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
|
||
using System; | ||
using System.ServiceModel; | ||
using System.ServiceModel.Channels; | ||
using System.ServiceModel.Tests.Common; | ||
using System.Text; | ||
using System.Xml; | ||
using Infrastructure.Common; | ||
using Xunit; | ||
|
||
public static class BasicHttpSecurityTest | ||
{ | ||
[WcfTheory] | ||
[InlineData(BasicHttpSecurityMode.Message)] | ||
[InlineData(BasicHttpSecurityMode.TransportWithMessageCredential)] | ||
public static void BasicHttpSecurity_MessageSecurityMode_ThrowsPNSE(BasicHttpSecurityMode value) | ||
{ | ||
var security = new BasicHttpSecurity(); | ||
Assert.Throws<PlatformNotSupportedException>(() => security.Mode = value); | ||
} | ||
} |