/// <summary> /// It creates a new proxy for modSIC Service access. /// </summary> /// <param name="modSicServiceURL">modSIC Service URL.</param> /// <param name="collectServiceMock">Only for unit tests purpose. Do not use this in production code.</param> public ModSicServiceProxy(string modSicServiceURL, ICollectService collectServiceMock = null) { this.ServiceConfigurationHelper = new ServiceConfigurationHelper(modSicServiceURL); if (collectServiceMock != null) { this.ModSicChannel = collectServiceMock; } }
public void Should_be_possible_to_create_new_WsHttpBinding_for_non_ssl_connection() { var certificateManagerMock = CreateCertificateManagerMock(); var svcConfigHelper = new ServiceConfigurationHelper(FAKE_SERVICE_URL_WITHOUT_SSL, certificateManagerMock); var wsHttpBinding = svcConfigHelper.CreateWsHttpBinding(); Assert.AreEqual(SecurityMode.None, wsHttpBinding.Security.Mode, "The security mode must be 'none' for no ssl connections."); certificateManagerMock.AssertWasNotCalled<ServerCertificateManager>(svc => svc.CreateCertificateValidationCallback()); }
/// <summary> /// It creates a new proxy for modSIC Service access. /// </summary> /// <param name="modSicServiceURL">modSIC Service URL.</param> /// <param name="collectServiceMock">Only for unit tests purpose. Do not use this in production code.</param> public ModSicServiceProxy(string modSicServiceURL, ICollectService collectServiceMock = null) { this.ServiceConfigurationHelper = new ServiceConfigurationHelper(modSicServiceURL); if (collectServiceMock != null) this.ModSicChannel = collectServiceMock; }
public ServiceConfigurationHelperTests() { this.CertificateManagerMock = this.CreateCertificateManagerMock(); this.ServiceConfigHelperWithSslUrl = new ServiceConfigurationHelper(FAKE_SERVICE_URL_WITH_SSL, CertificateManagerMock); }