Esempio n. 1
0
        public static void GetTypeExistsCriteria()
        {
            var mapping = new ElasticMapping();

            var criteria = mapping.GetTypeExistsCriteria(typeof(FormatClass));

            var exists = Assert.IsType <ExistsCriteria>(criteria);

            Assert.Equal("integerValue", exists.Field);
        }
Esempio n. 2
0
        [ExcludeFromCodeCoverage] // Expression isn't "executed"
        public static void GetTypeExistsCriteria_GuardClause()
        {
            var mapping = new ElasticMapping();

            Assert.Throws <ArgumentNullException>(() => mapping.GetTypeExistsCriteria(null));
        }