コード例 #1
0
ファイル: PactBuilderBase.cs プロジェクト: VaticanUK/com-pact
        internal PactBuilderBase(string consumer, string provider, string mockProviderServiceBaseUri, PactPublisher pactPublisher = null, string pactDir = null)
        {
            if (mockProviderServiceBaseUri is null)
            {
                throw new System.ArgumentNullException(nameof(mockProviderServiceBaseUri));
            }

            _pactDir       = pactDir;
            _pactPublisher = pactPublisher;

            _cts = new CancellationTokenSource();

            _consumer             = consumer ?? throw new System.ArgumentNullException(nameof(consumer));
            _provider             = provider ?? throw new System.ArgumentNullException(nameof(provider));
            MatchableInteractions = new MatchableInteractionList();

            _matcher = new RequestResponseMatcher(MatchableInteractions);

            ProviderWebHost.Run(mockProviderServiceBaseUri, _matcher, _cts);
        }