зеркало из https://github.com/mono/mono-tls.git
Move the NewTlsTestFeatures dependency registration out of Mono.Security.NewTls.TestProvider.
This commit is contained in:
Родитель
a243c9ccf4
Коммит
64437e1318
|
@ -30,12 +30,12 @@ using Xamarin.AsyncTests.MacUI;
|
|||
using AppKit;
|
||||
|
||||
[assembly: AsyncTestSuite (typeof (Mono.Security.NewTls.Tests.NewTlsTestFeatures), true)]
|
||||
|
||||
[assembly: DependencyProvider (typeof (Mono.Security.NewTls.Mac.MacDependencyProvider))]
|
||||
|
||||
namespace Mono.Security.NewTls.Mac
|
||||
{
|
||||
using TestProvider;
|
||||
using Tests;
|
||||
|
||||
public class MacDependencyProvider : IDependencyProvider
|
||||
{
|
||||
|
|
|
@ -41,7 +41,6 @@ using Mono.Security.Providers.NewTls;
|
|||
namespace Mono.Security.NewTls.TestProvider
|
||||
{
|
||||
using TestFramework;
|
||||
using Tests;
|
||||
|
||||
public sealed class NewTlsDependencyProvider : IDependencyProvider
|
||||
{
|
||||
|
@ -61,8 +60,6 @@ namespace Mono.Security.NewTls.TestProvider
|
|||
|
||||
DependencyInjector.RegisterDependency<ICryptoProvider> (() => new CryptoProvider ());
|
||||
|
||||
DependencyInjector.RegisterDependency<NewTlsTestFeatures> (() => new NewTlsTestFeatures ());
|
||||
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,11 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Collections.Generic;
|
||||
using Mono.Security.NewTls.TestFramework;
|
||||
using Xamarin.AsyncTests;
|
||||
using Xamarin.AsyncTests.Portable;
|
||||
using Xamarin.WebTests.Portable;
|
||||
using Xamarin.WebTests.HttpFramework;
|
||||
using Xamarin.WebTests.ConnectionFramework;
|
||||
|
@ -35,8 +37,11 @@ using Xamarin.WebTests.Providers;
|
|||
using Xamarin.WebTests.Resources;
|
||||
|
||||
[assembly: AsyncTestSuite (typeof (Mono.Security.NewTls.Tests.NewTlsTestFeatures))]
|
||||
[assembly: DependencyProvider (typeof (Mono.Security.NewTls.Tests.NewTlsTestFeaturesProvider))]
|
||||
[assembly: RequireDependency (typeof (ConnectionProviderFactory))]
|
||||
[assembly: RequireDependency (typeof (ICryptoProvider))]
|
||||
[assembly: RequireDependency (typeof (ICertificateProvider))]
|
||||
[assembly: RequireDependency (typeof (IPortableSupport))]
|
||||
[assembly: RequireDependency (typeof (IPortableWebSupport))]
|
||||
|
||||
namespace Mono.Security.NewTls.Tests
|
||||
|
@ -51,6 +56,14 @@ namespace Mono.Security.NewTls.Tests
|
|||
}
|
||||
}
|
||||
|
||||
public class NewTlsTestFeaturesProvider : IDependencyProvider
|
||||
{
|
||||
public void Initialize ()
|
||||
{
|
||||
DependencyInjector.RegisterDependency<NewTlsTestFeatures> (() => new NewTlsTestFeatures ());
|
||||
}
|
||||
}
|
||||
|
||||
public class NewTlsTestFeatures : SharedWebTestFeatures
|
||||
{
|
||||
public static NewTlsTestFeatures Instance {
|
||||
|
|
Загрузка…
Ссылка в новой задаче