protected override void ExpectResponse(IGetMappingResponse response) { response.IsValid.Should().BeTrue(); var visitor = new TestVisitor(); response.Accept(visitor); visitor.CountsShouldContainKeyAndCountBe("type", 1); visitor.CountsShouldContainKeyAndCountBe("object", 4); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("text", 10); visitor.CountsShouldContainKeyAndCountBe("keyword", 9); visitor.CountsShouldContainKeyAndCountBe("ip", 1); visitor.CountsShouldContainKeyAndCountBe("number", 3); visitor.CountsShouldContainKeyAndCountBe("geo_point", 2); visitor.CountsShouldContainKeyAndCountBe("completion", 2); visitor.CountsShouldContainKeyAndCountBe("nested", 1); }
//hide private static void AssertVisitedProperties(GetMappingResponse response) { var visitor = new TestVisitor(); var b = TestClient.Configuration.Random.SourceSerializer; response.Accept(visitor); visitor.CountsShouldContainKeyAndCountBe("type", 1); visitor.CountsShouldContainKeyAndCountBe("text", b ? 18 : 17); visitor.CountsShouldContainKeyAndCountBe("keyword", b ? 19 : 18); visitor.CountsShouldContainKeyAndCountBe("object", 8); visitor.CountsShouldContainKeyAndCountBe("number", 9); visitor.CountsShouldContainKeyAndCountBe("ip", 2); visitor.CountsShouldContainKeyAndCountBe("geo_point", 3); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("join", 1); visitor.CountsShouldContainKeyAndCountBe("completion", 2); visitor.CountsShouldContainKeyAndCountBe("date_range", 1); visitor.CountsShouldContainKeyAndCountBe("double_range", 1); visitor.CountsShouldContainKeyAndCountBe("float_range", 1); visitor.CountsShouldContainKeyAndCountBe("integer_range", 1); visitor.CountsShouldContainKeyAndCountBe("long_range", 1); visitor.CountsShouldContainKeyAndCountBe("ip_range", 1); visitor.CountsShouldContainKeyAndCountBe("nested", 1); }
protected override void ExpectResponse(IGetMappingResponse response) { response.ShouldBeValid(); var visitor = new TestVisitor(); response.Accept(visitor); visitor.CountsShouldContainKeyAndCountBe("type", 1); visitor.CountsShouldContainKeyAndCountBe("object", 5); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("text", 11); visitor.CountsShouldContainKeyAndCountBe("keyword", 10); visitor.CountsShouldContainKeyAndCountBe("ip", 1); visitor.CountsShouldContainKeyAndCountBe("number", 3); visitor.CountsShouldContainKeyAndCountBe("geo_point", 2); visitor.CountsShouldContainKeyAndCountBe("completion", 2); visitor.CountsShouldContainKeyAndCountBe("nested", 1); visitor.CountsShouldContainKeyAndCountBe("date_range", 1); visitor.CountsShouldContainKeyAndCountBe("float_range", 1); visitor.CountsShouldContainKeyAndCountBe("integer_range", 1); visitor.CountsShouldContainKeyAndCountBe("double_range", 1); visitor.CountsShouldContainKeyAndCountBe("long_range", 1); }
protected override void ExpectResponse(IGetMappingResponse response) { response.ShouldBeValid(); var visitor = new TestVisitor(); response.Accept(visitor); visitor.CountsShouldContainKeyAndCountBe("type", 1); //ranges property is ignored on versions before 5.2.0 var supportsRanges = TestClient.VersionUnderTestSatisfiedBy(">=5.2.0"); visitor.CountsShouldContainKeyAndCountBe("object", supportsRanges ? 5 : 4); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("text", 11); visitor.CountsShouldContainKeyAndCountBe("keyword", 10); visitor.CountsShouldContainKeyAndCountBe("ip", 1); visitor.CountsShouldContainKeyAndCountBe("number", 3); visitor.CountsShouldContainKeyAndCountBe("geo_point", 2); visitor.CountsShouldContainKeyAndCountBe("completion", 2); visitor.CountsShouldContainKeyAndCountBe("nested", 1); if (supportsRanges) { visitor.CountsShouldContainKeyAndCountBe("date_range", 1); visitor.CountsShouldContainKeyAndCountBe("float_range", 1); visitor.CountsShouldContainKeyAndCountBe("integer_range", 1); visitor.CountsShouldContainKeyAndCountBe("double_range", 1); visitor.CountsShouldContainKeyAndCountBe("long_range", 1); } }
//hide private static void AssertVisitedProperties(GetMappingResponse response) { var visitor = new TestVisitor(); var b = TestClient.Configuration.Random.SourceSerializer; var supportsFlattenedType = TestConfiguration.Instance.InRange(">=7.3.0"); response.Accept(visitor); visitor.CountsShouldContainKeyAndCountBe("type", 1); visitor.CountsShouldContainKeyAndCountBe("text", b ? 18 : 17); visitor.CountsShouldContainKeyAndCountBe("keyword", b ? 19 : 18); visitor.CountsShouldContainKeyAndCountBe("object", supportsFlattenedType? 8 : 9); visitor.CountsShouldContainKeyAndCountBe("number", 9); visitor.CountsShouldContainKeyAndCountBe("ip", 2); visitor.CountsShouldContainKeyAndCountBe("geo_point", 3); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("join", 1); visitor.CountsShouldContainKeyAndCountBe("completion", 2); visitor.CountsShouldContainKeyAndCountBe("date_range", 1); visitor.CountsShouldContainKeyAndCountBe("double_range", 1); visitor.CountsShouldContainKeyAndCountBe("float_range", 1); visitor.CountsShouldContainKeyAndCountBe("integer_range", 1); visitor.CountsShouldContainKeyAndCountBe("long_range", 1); visitor.CountsShouldContainKeyAndCountBe("ip_range", 1); visitor.CountsShouldContainKeyAndCountBe("nested", 1); visitor.CountsShouldContainKeyAndCountBe("rank_feature", 1); if (supportsFlattenedType) { visitor.CountsShouldContainKeyAndCountBe("flattened", 1); } }
protected override void ExpectResponse(IGetMappingResponse response) { response.ShouldBeValid(); var visitor = new TestVisitor(); response.Accept(visitor); var b = TestClient.Configuration.UsingCustomSourceSerializer; visitor.CountsShouldContainKeyAndCountBe("type", 1); visitor.CountsShouldContainKeyAndCountBe("text", b ? 19 : 18); visitor.CountsShouldContainKeyAndCountBe("keyword", b ? 19 : 18); visitor.CountsShouldContainKeyAndCountBe("object", 8); visitor.CountsShouldContainKeyAndCountBe("number", 7); visitor.CountsShouldContainKeyAndCountBe("ip", 2); visitor.CountsShouldContainKeyAndCountBe("geo_point", 3); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("join", 1); visitor.CountsShouldContainKeyAndCountBe("completion", 2); visitor.CountsShouldContainKeyAndCountBe("date_range", 1); visitor.CountsShouldContainKeyAndCountBe("double_range", 1); visitor.CountsShouldContainKeyAndCountBe("float_range", 1); visitor.CountsShouldContainKeyAndCountBe("integer_range", 1); visitor.CountsShouldContainKeyAndCountBe("long_range", 1); visitor.CountsShouldContainKeyAndCountBe("nested", 1); }