Exemplo n.º 1
0
 internal PactPublisher(
     string brokerBaseUri,
     PactUriOptions brokerUriOptions,
     HttpMessageHandler handler)
 {
     _httpClient = new HttpClient(handler)
     {
         BaseAddress = new Uri(brokerBaseUri)
     };
     _brokerUriOptions = brokerUriOptions;
 }
Exemplo n.º 2
0
        public IPactVerifier PactUri(string uri, PactUriOptions options = null)
        {
            if (String.IsNullOrEmpty(uri))
            {
                throw new ArgumentException("Please supply a non null or empty consumerName");
            }

            PactFileUri    = uri;
            PactUriOptions = options;

            return(this);
        }
Exemplo n.º 3
0
        public IPactVerifier PactUri(string fileUri, PactUriOptions options = null)
        {
            if (IsNullOrEmpty(fileUri))
            {
                throw new ArgumentException("Please supply a non null or empty fileUri");
            }

            PactFileUri    = fileUri;
            PactUriOptions = options;

            return(this);
        }
Exemplo n.º 4
0
        public IPactVerifier PactUri(string fileUri, PactUriOptions uriOptions = null, IEnumerable <string> providerVersionTags = null)
        {
            if (IsNullOrEmpty(fileUri))
            {
                throw new ArgumentException("Please supply a non null or empty fileUri");
            }

            PactFileUri         = fileUri;
            PactUriOptions      = uriOptions;
            ProviderVersionTags = providerVersionTags;

            return(this);
        }
Exemplo n.º 5
0
        public IPactVerifier PactBroker(string brokerBaseUri, PactUriOptions uriOptions = null, bool enablePending = false,
                                        IEnumerable <string> consumerVersionTags        = null, IEnumerable <string> providerVersionTags = null, IEnumerable <VersionTagSelector> consumerVersionSelectors = null)
        {
            if (IsNullOrEmpty(brokerBaseUri))
            {
                throw new ArgumentException("Please supply a non null or empty brokerBaseUri");
            }

            BrokerBaseUri            = brokerBaseUri;
            PactUriOptions           = uriOptions;
            EnablePending            = enablePending;
            ConsumerVersionTags      = consumerVersionTags;
            ProviderVersionTags      = providerVersionTags;
            ConsumerVersionSelectors = consumerVersionSelectors;

            return(this);
        }
Exemplo n.º 6
0
 public PactPublisher(string brokerBaseUri, PactUriOptions brokerUriOptions = null) :
     this(brokerBaseUri, brokerUriOptions, new HttpClientHandler())
 {
 }