protected override void ExpectResponse(IGetMappingResponse response) { response.ShouldBeValid(); var visitor = new TestVisitor(); response.Accept(visitor); visitor.CountsShouldContainKeyAndCountBe("type", 1); visitor.CountsShouldContainKeyAndCountBe("join", 1); visitor.CountsShouldContainKeyAndCountBe("object", 7); visitor.CountsShouldContainKeyAndCountBe("date", 4); visitor.CountsShouldContainKeyAndCountBe("text", 18); visitor.CountsShouldContainKeyAndCountBe("keyword", 17); visitor.CountsShouldContainKeyAndCountBe("ip", 2); visitor.CountsShouldContainKeyAndCountBe("number", 7); visitor.CountsShouldContainKeyAndCountBe("geo_point", 3); 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); } }
protected override void ExpectResponse(IGetMappingResponse response) { response.ShouldBeValid(); response.Indices["project"]["doc"].Properties.Should().NotBeEmpty(); response.Indices[Index <Project>()].Mappings[Type <Project>()].Properties.Should().NotBeEmpty(); response.Indices[Index <Project>()][Type <Project>()].Properties.Should().NotBeEmpty(); var properties = response.Indices[Index <Project>()][Type <Project>()].Properties; var leadDev = properties[Property <Project>(p => p.LeadDeveloper)]; leadDev.Should().NotBeNull(); var props = response.Indices["x"]?["y"].Properties; props.Should().BeNull(); //hide AssertExtensionMethods(response); //hide AssertVisitedProperies(response); }