You've already forked linux-packaging-mono
Imported Upstream version 5.20.0.180
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
parent
0e2d47d1c8
commit
0510252385
@ -34,6 +34,8 @@ using System.ServiceModel.Configuration;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.Configuration;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
@ -41,7 +43,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[Test]
|
||||
public void ReadConfiguration () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/client.endpoint").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/client.endpoint")).GetSectionGroup ("system.serviceModel");
|
||||
AddressHeaderCollection col = config.Client.Endpoints [0].Headers.Headers;
|
||||
|
||||
Assert.AreEqual (2, col.Count, "count");
|
||||
|
@ -34,6 +34,8 @@ using System.ServiceModel.Configuration;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.Configuration;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
@ -44,7 +46,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
[Category("NotWorking")]
|
||||
[Ignore ("fails under .NET; I never bothered to fix the test")]
|
||||
public void UserConfiguration () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/userBinding").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/userBinding")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
BindingsSection section = config.Bindings;
|
||||
|
||||
|
@ -37,13 +37,15 @@ using System.Net;
|
||||
using System.ServiceModel;
|
||||
using System.Net.Security;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
public class CustomBindingElementTest
|
||||
{
|
||||
CustomBindingCollectionElement OpenConfig () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/customBinding").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/customBinding")).GetSectionGroup ("system.serviceModel");
|
||||
Assert.AreEqual (7, config.Bindings.CustomBinding.Bindings.Count, "CustomBinding count");
|
||||
return config.Bindings.CustomBinding;
|
||||
}
|
||||
|
@ -37,13 +37,15 @@ using System.Security.Cryptography.X509Certificates;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Security.Principal;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
public class EndpointBehaviorElementTest
|
||||
{
|
||||
EndpointBehaviorElement OpenConfig () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/endpointBehaviors").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/endpointBehaviors")).GetSectionGroup ("system.serviceModel");
|
||||
return config.Behaviors.EndpointBehaviors [0];
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,8 @@ using System.ServiceModel.Configuration;
|
||||
using System.Configuration;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
@ -63,7 +65,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
|
||||
[Test]
|
||||
public void BindingExtensions () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/extensions").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/extensions")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
Assert.AreEqual (typeof (BasicHttpBindingCollectionElement).AssemblyQualifiedName, config.Extensions.BindingExtensions ["basicHttpBinding"].Type, "baseHttpBinding");
|
||||
Assert.AreEqual (typeof (NetTcpBindingCollectionElement).AssemblyQualifiedName, config.Extensions.BindingExtensions ["netTcpBinding"].Type, "baseHttpBinding");
|
||||
@ -74,7 +76,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
|
||||
[Test]
|
||||
public void BehaviorExtensions () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/extensions").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/extensions")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
Assert.AreEqual (typeof (ServiceAuthorizationElement).AssemblyQualifiedName, config.Extensions.BehaviorExtensions ["serviceAuthorization"].Type, "serviceAuthorization");
|
||||
Assert.AreEqual ("MyBehaviorElement", config.Extensions.BehaviorExtensions ["behaviorExtensions1"].Type, "MyBehaviorElement");
|
||||
@ -83,7 +85,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
|
||||
[Test]
|
||||
public void BindingElementExtensions () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/extensions").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/extensions")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
Assert.AreEqual (typeof (BinaryMessageEncodingElement).AssemblyQualifiedName, config.Extensions.BindingElementExtensions ["binaryMessageEncoding"].Type, "binaryMessageEncoding");
|
||||
Assert.AreEqual ("MyBindingElementElement", config.Extensions.BindingElementExtensions ["bindingElementExtensions1"].Type, "MyBindingElementElement");
|
||||
|
@ -35,13 +35,15 @@ using System.Configuration;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Description;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
public class MetadataElementTest
|
||||
{
|
||||
ServiceModelSectionGroup OpenConfig (string name) {
|
||||
return (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/" + name).GetSectionGroup ("system.serviceModel");
|
||||
return (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/" + name)).GetSectionGroup ("system.serviceModel");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -37,13 +37,15 @@ using System.ServiceModel;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.ServiceModel.Security;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
public class ServiceBehaviorElementTest
|
||||
{
|
||||
ServiceBehaviorElement OpenConfig () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/serviceBehaviors").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/serviceBehaviors")).GetSectionGroup ("system.serviceModel");
|
||||
return config.Behaviors.ServiceBehaviors [0];
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,8 @@ using NUnit.Framework;
|
||||
using System.ServiceModel.Configuration;
|
||||
using System.Configuration;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
@ -40,7 +42,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[Test]
|
||||
public void ReadConfiguration () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/service").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/service")).GetSectionGroup ("system.serviceModel");
|
||||
ServiceElement service = config.Services.Services [0];
|
||||
|
||||
Assert.AreEqual ("ServiceType", service.Name, "Name");
|
||||
@ -76,7 +78,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
|
||||
[Test]
|
||||
public void ServiceEndpointCollection () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/service").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/service")).GetSectionGroup ("system.serviceModel");
|
||||
ServiceElement service = config.Services.Services [1];
|
||||
|
||||
Assert.AreEqual (3, service.Endpoints.Count, "Count");
|
||||
|
@ -40,6 +40,8 @@ using NUnit.Framework;
|
||||
|
||||
using ConfigurationType = System.Configuration.Configuration;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
@ -57,7 +59,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
[Test]
|
||||
public void GetSectionGroup ()
|
||||
{
|
||||
ServiceModelSectionGroup g = GetConfig ("Test/config/test1");
|
||||
ServiceModelSectionGroup g = GetConfig (TestResourceHelper.GetFullPathOfResource ("Test/config/test1"));
|
||||
Assert.IsNotNull (g.Bindings, "bindings");
|
||||
Assert.IsNotNull (g.Client, "client");
|
||||
Assert.IsNotNull (g.Services, "services");
|
||||
@ -68,7 +70,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
[Category ("NotWorking")]
|
||||
[Ignore ("fails under .NET; I never bothered to fix the test")]
|
||||
public void BindingCollections () {
|
||||
ServiceModelSectionGroup g = GetConfig ("Test/config/test1.config");
|
||||
ServiceModelSectionGroup g = GetConfig (TestResourceHelper.GetFullPathOfResource ("Test/config/test1.config"));
|
||||
List<BindingCollectionElement> coll = g.Bindings.BindingCollections;
|
||||
Assert.AreEqual (20, coll.Count, "Count");
|
||||
}
|
||||
@ -76,7 +78,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
[Test]
|
||||
public void Endpoints ()
|
||||
{
|
||||
ServiceModelSectionGroup g = GetConfig ("Test/config/test1");
|
||||
ServiceModelSectionGroup g = GetConfig (TestResourceHelper.GetFullPathOfResource ("Test/config/test1"));
|
||||
ChannelEndpointElementCollection col = g.Client.Endpoints;
|
||||
Assert.AreEqual (1, col.Count, "initial count");
|
||||
ChannelEndpointElement e = col [0];
|
||||
|
@ -35,6 +35,8 @@ using System.ServiceModel.Security;
|
||||
using System.ServiceModel;
|
||||
using System.Net.Security;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[TestFixture]
|
||||
@ -42,7 +44,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
{
|
||||
[Test]
|
||||
public void BasicHttpBinding () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/basicHttpBinding").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/basicHttpBinding")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
BasicHttpBindingCollectionElement basicHttpBinding = config.Bindings.BasicHttpBinding;
|
||||
Assert.AreEqual (2, basicHttpBinding.Bindings.Count, "count");
|
||||
@ -55,7 +57,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
|
||||
[Test]
|
||||
public void NetTcpBinding () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/netTcpBinding").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/netTcpBinding")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
NetTcpBindingCollectionElement netTcpBinding = config.Bindings.NetTcpBinding;
|
||||
Assert.AreEqual (1, netTcpBinding.Bindings.Count, "count");
|
||||
@ -71,7 +73,7 @@ namespace MonoTests.System.ServiceModel.Configuration
|
||||
|
||||
[Test]
|
||||
public void WSHttpBinding () {
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration ("Test/config/wsHttpBinding").GetSectionGroup ("system.serviceModel");
|
||||
ServiceModelSectionGroup config = (ServiceModelSectionGroup) ConfigurationManager.OpenExeConfiguration (TestResourceHelper.GetFullPathOfResource ("Test/config/wsHttpBinding")).GetSectionGroup ("system.serviceModel");
|
||||
|
||||
WSHttpBindingCollectionElement wsHttpBinding = config.Bindings.WSHttpBinding;
|
||||
Assert.AreEqual (1, wsHttpBinding.Bindings.Count, "count");
|
||||
|
Reference in New Issue
Block a user