<commit_before>﻿using System;
using System.Collections.Generic;
using PactNet;
using PactNet.Mocks.MockHttpService;
using PactNet.Mocks.MockHttpService.Models;
using SEEK.AdPostingApi.Client.Models;

namespace SEEK.AdPostingApi.SampleConsumer.Tests
{
    public static class PactProvider
    {
        private const int MockProviderServicePort = 8893;

        private static readonly IPactBuilder PactBuilder;

        static PactProvider()
        {
            PactBuilder = new PactBuilder(
                new PactConfig
                {
                    PactDir = "../../pacts/",
                    LogDir = "../../logs/"
                })
                .ServiceConsumer("AdPostingApi SampleConsumer")
                .HasPactWith("AdPostingApi");

            MockService = PactBuilder.MockService(MockProviderServicePort);
            MockServiceUri = new Uri("http://localhost:" + MockProviderServicePort);
        }

        public static IMockProviderService MockService { get; private set; }

        public static Uri MockServiceUri { get; private set; }

        public static void ClearInteractions()
        {
            MockService.ClearInteractions();<commit_msg>rename pact consumer and provider names for consistency with other services<commit_after>﻿using System;
using System.Collections.Generic;
using PactNet;
using PactNet.Mocks.MockHttpService;
using PactNet.Mocks.MockHttpService.Models;
using SEEK.AdPostingApi.Client.Models;

namespace SEEK.AdPostingApi.SampleConsumer.Tests
{
    public static class PactProvider
    {
        private const int MockProviderServicePort = 8893;

        private static readonly IPactBuilder PactBuilder;

        static PactProvider()
        {
            PactBuilder = new PactBuilder(
                new PactConfig
                {
                    PactDir = "../../pacts/",
                    LogDir = "../../logs/"
                })
                .ServiceConsumer("Ad Posting API Sample Consumer")
                .HasPactWith("Ad Posting API");

            MockService = PactBuilder.MockService(MockProviderServicePort);
            MockServiceUri = new Uri("http://localhost:" + MockProviderServicePort);
        }

        public static IMockProviderService MockService { get; }

        public static Uri MockServiceUri { get; private set; }

        public static void ClearInteractions()
        {
            MockService.ClearInteractions();
{'fraction_non_alphanumeric': 0.08175842235004109, 'fraction_numerical': 0.003286770747740345, 'mean_word_length': 2.212401055408971, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1561603', 'n_tokens_mistral': 632, 'n_tokens_neox': 594, 'n_words': 146}