public void IdIsProperlyInferreredWhenReferencingGuidDirectly() { //this is just to show nest can reference GUID as alternative ids albeit with the D formatting var guid = Guid.NewGuid(); var o = new MyOtherIndexableEvent() {Id = "this-is-not-the-id", ContentGUID = guid}; var id = _client.Infer.Id(o); id.Should().NotBeBlank().And.Be(o.ContentGUID.ToString("D")); }
public void IdIsProperlyInferreredWhenReferencingGuidDirectly() { //this is just to show nest can reference GUID as alternative ids albeit with the D formatting var guid = Guid.NewGuid(); var o = new MyOtherIndexableEvent() { Id = "this-is-not-the-id", ContentGUID = guid }; var id = _client.Infer.Id(o); id.Should().NotBeNullOrWhiteSpace().And.Be(o.ContentGUID.ToString("D")); }