public ServiceModelDiscoveryService(IServiceModelDiscoveryClientWrapper discoveryClient, IChannelFactoryWrapper channelFactory, IBindingFactory bindingFactory, IOptions <ServiceModelDiscoveryOptions> options, ILogger <ServiceModelDiscoveryService> logger) { _discoveryClient = discoveryClient ?? throw new ArgumentNullException(nameof(discoveryClient)); _channelFactory = channelFactory ?? throw new ArgumentNullException(nameof(channelFactory)); _bindingFactory = bindingFactory ?? throw new ArgumentNullException(nameof(bindingFactory)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _options = options?.Value ?? throw new ArgumentNullException(nameof(options)); }
public void Discover_uses_DiscoveryClientWrapper_to_find_valid_endpoints([Frozen] IServiceModelDiscoveryClientWrapper discoveryClient, ServiceModelDiscoveryService sut) { sut.Discover <ITestService>(); Mock.Get(discoveryClient).Verify(p => p.FindEndpoints(It.IsAny <DiscoveryEndpoint>(), It.IsAny <FindCriteria>())); }