<commit_before>﻿using System;
using Elasticsearch.Net;
using FluentAssertions;
using Nest;
using Tests.Framework;
using Tests.Framework.Integration;
using Tests.Framework.MockData;
using Xunit;

namespace Tests.Cluster.ClusterAllocationExplain
{
	[Collection(IntegrationContext.ReadOnly)]
	public class ClusterAllocationExplainApiTests : ApiIntegrationTestBase<IClusterAllocationExplainResponse, IClusterAllocationExplainRequest, ClusterAllocationExplainDescriptor, ClusterAllocationExplainRequest>
	{
		public ClusterAllocationExplainApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
		protected override LazyResponses ClientUsage() => Calls(
			fluent: (client, f) => client.ClusterAllocationExplain(f),
			fluentAsync: (client, f) => client.ClusterAllocationExplainAsync(f),
			request: (client, r) => client.ClusterAllocationExplain(r),
			requestAsync: (client, r) => client.ClusterAllocationExplainAsync(r)
		);

		protected override bool ExpectIsValid => true;
		protected override int ExpectStatusCode => 200;
		protected override HttpMethod HttpMethod => HttpMethod.POST;
		protected override string UrlPath => "/_cluster/allocation/explain?include_yes_decisions=true";

		protected override object ExpectJson =>
			new
			{
				index = "project",
				shard = 0,
				primary = true
			};<commit_msg>Fix build post test framework merge<commit_after>﻿using System;
using Elasticsearch.Net;
using FluentAssertions;
using Nest;
using Tests.Framework;
using Tests.Framework.Integration;
using Tests.Framework.MockData;
using Xunit;

namespace Tests.Cluster.ClusterAllocationExplain
{
	[Collection(TypeOfCluster.ReadOnly)]
	public class ClusterAllocationExplainApiTests : ApiIntegrationTestBase<IClusterAllocationExplainResponse, IClusterAllocationExplainRequest, ClusterAllocationExplainDescriptor, ClusterAllocationExplainRequest>
	{
		public ClusterAllocationExplainApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : base(cluster, usage) { }
		protected override LazyResponses ClientUsage() => Calls(
			fluent: (client, f) => client.ClusterAllocationExplain(f),
			fluentAsync: (client, f) => client.ClusterAllocationExplainAsync(f),
			request: (client, r) => client.ClusterAllocationExplain(r),
			requestAsync: (client, r) => client.ClusterAllocationExplainAsync(r)
		);

		protected override bool ExpectIsValid => true;
		protected override int ExpectStatusCode => 200;
		protected override HttpMethod HttpMethod => HttpMethod.POST;
		protected override string UrlPath => "/_cluster/allocation/explain?include_yes_decisions=true";

		protected override object ExpectJson =>
			new
			{
				index = "project",
				shard = 0,
				primary = true
			};
{'fraction_non_alphanumeric': 0.08898776418242492, 'fraction_numerical': 0.0029662588060808304, 'mean_word_length': 6.45303867403315, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '6990406', 'n_tokens_mistral': 826, 'n_tokens_neox': 753, 'n_words': 175}