public static void GetDocumentTypeIsCouchbaseDocument() { var mapping = new CouchbaseElasticMapping(); var result = mapping.GetDocumentType(null); Assert.Equal("couchbaseDocument", result); }
public void TypeSelectionCriteriaIsAddedWhenNoOtherCriteria() { var mapping = new CouchbaseElasticMapping(); var translation = ElasticQueryTranslator.Translate(Mapping, "prefix", Robots.Expression); Assert.IsType<ExistsCriteria>(translation.SearchRequest.Filter); }
public static void GetDocumentMappingPrefixReturnsDoc() { var mapping = new CouchbaseElasticMapping(); var result = mapping.GetDocumentMappingPrefix(null); Assert.Equal("doc", result); }
public static void GetFieldName_Correctly_Cases_And_Prefixes_Property_Name(bool camelCaseFieldNames, string expected) { Expression<Func<ClassWithValueType, Guid>> stringAccess = (ClassWithValueType s) => s.Candidate; var mapping = new CouchbaseElasticMapping(camelCaseFieldNames: camelCaseFieldNames); var actual = mapping.GetFieldName(typeof(ClassWithValueType), (MemberExpression)stringAccess.Body); Assert.Equal(expected, actual); }